In Yii1 I used to have my own components under the components folder of the structure, now with namespacing this is a little bit different.
In Yii1 I used to have my own components under the components folder of the structure, now with namespacing this is a little bit different.
Note the tag {{homeUrl}}
will be dynamically replaced at runtime.
Ok, you have installed a Yii 2 basic or advanced app for the first time and completed the post install steps. You have picked up a few extensions to install for the first time as well. You would already see a composer.lock
file in your application root folder.
The tips here are for advanced usages of composer and its assumed you have read about using composer and have a knowledge of your vendor packages to be updated. Let's consider, you want to update only one specific yii2 vendor library, without updating all the other extension packages?
hello guys now i am going to show you how to Reuse File Upload Code across multiple projects.
Suppose we want to set a category to product (or an item in general term), Also suppose categories has sub-categories (multi-level)
Suppose you want to have a list in Category with its related products and you want to updates the list (removing or insert product items) This wiki show us how to do that
CGridview displays existent rows of the table (using DataProvider)
首先我们需要下载好Yii tinymce扩展,放入你的extensions目录下,
There are several ways to speedup slow unit tests which interact with database:
I spend a bit of time looking for the this piece of code while building time feature on a site this tutorial also helped Local time zones and locales
The yii2-datecontrol extension allows you to control separate date formats for display and saving for form inputs.
There are cases that you want to make an ajax request to another server and get the results.
The yii2-field-range extension enables you to easily setup ActiveField range fields with Bootstrap styling. You basically can setup two attributes joined together like a single field with combined validation error block.
This wiki shows how to get the geolocation info of the client using another server API It could be write also as extension but there are a lots of APIs that change the below code So, I wrote the below code that works for one of them (using www.geoplugin.net)
You have a 'Category' model with Id, Name and Visibility (boolean, where 0 = Public, and 1 = Private).