PHP code example of javii-script / default-value-filterable
1. Go to this page and download the library: Download javii-script/default-value-filterable 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/ */
javii-script / default-value-filterable example snippets
Text::make('Name')
->defaultFilterable(function () {
return 'John Doe';
}),
Text::make('Name')
->defaultFilterable(function () {
return 'John Doe';
}, function ($request, $query, $value, $attribute) {
$query->where($attribute, 'LIKE', "{$value}%");
}),