PHP code example of ktr / laravel-lightsearch-driver
1. Go to this page and download the library: Download ktr/laravel-lightsearch-driver 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/ */
ktr / laravel-lightsearch-driver example snippets
$results = Model::search('keyword')->get();
'lightsearch' => [
'model_field_weights' => [
\App\Models\Address::class => [
'city' => 2,
],
],
],
bash
composer vendor:publish --provider="Ktr\LightSearch\LightSearchServiceProvider" --tag="migrations"
php artisan migrate