PHP code example of khalin / nova4-searchable-belongs-to-filter
1. Go to this page and download the library: Download khalin/nova4-searchable-belongs-to-filter library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
khalin / nova4-searchable-belongs-to-filter example snippets
// app/Nova/User.php
use Khalin\Nova4SearchableBelongsToFilter\NovaSearchableBelongsToFilter
public function filters(Request $request)
{
return [
(new NovaSearchableBelongsToFilter('my-new-name'))
->fieldAttribute('department')
->filterBy('department_id')
];
}