Revision #4 has been created by sangprabo on Mar 18, 2019, 12:47:32 PM with the memo:
Remove the image
« previous (#3) next (#5) »
Nested Set with Yii2
[...]$ ./yii migrate
If everything is okay, then you could see that a new table named `category` already exists.
<img src="http://3.bp.blogspot.com/-kDWGxQLPPUw/XCrzycZVViI/AAAAAAAAEJo/kHXaGNXe0d0ihMv3EJvzR-UXUxCRPnI-wCLcBGAs/s1600/Nested%2BSet%2Btable.png" />
Generate the default CRUD using Gii
To initiate a model, we need to use Gii tool from Yii2. Call the tool from your `localhost:8080/gii/model`, and fill in the Table Name field with our existing table: `category`. Fill other fields with appropriate values, and don't forget to give a check to "Generate ActiveQuery" checklist item. This will generate another file that needs to be modified later.