Download the PHP package genealabs/nova-prepopulate-searchable without Composer
On this page you can find all versions of the php package genealabs/nova-prepopulate-searchable. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download genealabs/nova-prepopulate-searchable
More information about genealabs/nova-prepopulate-searchable
Files in genealabs/nova-prepopulate-searchable
Package nova-prepopulate-searchable
Short Description A tool to allow BelongsTo searchable fields to be pre-populated with data
License MIT
Homepage https://github.com/alexbowers/nova-prepopulate-searchable
Informations about the package nova-prepopulate-searchable
This package has been archived until such time that it can be brought up-to-date with Laravel Nova. We have stopped using Laravel Nova, and no longer have a license for it. As such we currently cannot justify further development on this package. Please check here for availability of similar packages: https://novapackages.com
Prepoulate Searchable for Laravel Nova
A tool to allow BelongsTo searchable fields to be pre-populated with data
Sponsors
We thank the following sponsors for their generosity. Please take a moment to check them out:
Requirements
- PHP 7.3+
- Laravel 7.0+
- Nova 3.8.4+
Installation
You can install the package in to a Laravel app that uses Nova via composer:
Usage
On any BelongsTo
fields in your resources that are searchable()
, you can also add prepopulate()
to the method chain and the field will be prepopulated with values to choose from.
You may optionally pass through a search query to the prepopulate method, and the keywords passed will be used for the search initially, before resetting the search to being empty (as it currently is).
Limiting Pre-Populated Items
You can limit the prepopulated items by passing in a search string to the prepopulated()
method like so:
This would prepopulate all archives that have test in their display field.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
Alex Bowers
Alex is the original developer of this package and has done a great job with initial development.
Mike Bronner
I started using this package and didn't want it to fall to the way-side, as it helps improve the UX of Nova significantly. Alex graceously allowed me to continue development and maintenance on his original package.
License
The MIT License (MIT). Please see License File for more information.