# 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

```php
 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

```php
 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.

```php
 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](https://boxicons.com/) pack and set `$icon` to the full class name like `bx bx-user`

```php
 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

```php
 public ?string $group = "ACL";
```
