Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
iotron committed Apr 7, 2024
1 parent e8ff24e commit e3f2cf0
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ This package adds a dynamic select tree field to your Laravel / Filament applica

![Select Tree](https://github.com/CodeWithDennis/filament-select-tree/assets/23448484/d944b896-134b-414a-b654-9adecc43ba5e)


## Installation

You can install the package via composer:
Expand Down Expand Up @@ -150,14 +149,24 @@ Allow soft deleted items to be displayed
->withTrashed()
```

Specify a different key for your model.
Specify a different key for your model.
For example: you have id, code and parent_code. Your model uses id as key, but the parent-child relation is established between code and parent_code

```PHP
->withKey('code')
```

Store fetched models for additional functionality.

```PHP
->storeResults()
->afterStateUpdated(function ($state, SelectTree $component) {
$component->getResults()
}),
```

## Filters

Use the tree in your table filters. Here's an example to show you how.

```bash
Expand Down Expand Up @@ -191,6 +200,7 @@ use CodeWithDennis\FilamentSelectTree\SelectTree;
```

## Screenshots

![download.png](./resources/images/example.png)

## Contributing
Expand All @@ -203,9 +213,9 @@ Please review [our security policy](../../security/policy) on how to report secu

## Credits

- [CodeWithDennis](https://github.com/CodeWithDennis)
- [Dipson88](https://github.com/dipson88/treeselectjs)
- [All Contributors](../../contributors)
- [CodeWithDennis](https://github.com/CodeWithDennis)
- [Dipson88](https://github.com/dipson88/treeselectjs)
- [All Contributors](../../contributors)

## License

Expand Down

0 comments on commit e3f2cf0

Please sign in to comment.