Nested Set with Yii2

Comparing #3 with #4

Revision #4 was created by sangprabo sangprabo on Mar 18, 2019, 12:47:32 PM.

Remove the image

Content

[...]
$ ./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.
[...]