PHP code example of sebastiansulinski / laravel-search
1. Go to this page and download the library: Download sebastiansulinski/laravel-search 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/ */
sebastiansulinski / laravel-search example snippets
use Illuminate\Database\Eloquent\Model;
use SebastianSulinski\Search\IndexableDocument;
use SebastianSulinski\Search\SearchIndexable;
class Book extends Model implements IndexableDocument
{
// ...
use SearchIndexable;
public static function searchableAs(): array
{
return ['global_search'];
}