🔦Using

The magic tool of this VILT stack framework is the Resource class, because this class do every thing for you by just set the rows on it.

Every resource has some attributes every of this attrs can make a change on the resource, and a lot of methods

you can find a page for every method you can use on your resource.

Resource API

to active API for any resource just make

 public ?bool $api = true;

and you will get a full API CRUD on /api path

Resource Menu

you can control resource menu show / hide by this prop

 public ?bool $menu = true;

Resource Model

The very important attribute is a $model because it uses to get and set data to the CRUD and you can set it to any Model::class you when, by default the generator set it to the model of the table you select it.

 public ?Model $model = User::class;

Resource Icon

The $icon is used to set the sidebar menu item icon, you can select your icons form box icons pack and set $icon to the full class name like bx bx-user

 public ?string $icon = "bx bx-user";

Resource Group

The $group is used to group the menus items to be easy to collect your module links on one place

 public ?string $group = "ACL";

Last updated