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) »
Changes
Title
unchanged
Nested Set with Yii2
Category
unchanged
Tutorials
Yii version
unchanged
2.0
Tags
unchanged
nested-set
Content
changed
[...]
$ ./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" />
<h2>
Generate the default CRUD using Gii
</h2>
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.[...]