PHP code example of lunarphp / search
1. Go to this page and download the library: Download lunarphp/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/ */
lunarphp / search example snippets
use Lunar\Search\Facades\Search;
// Search on a specific model
$results = Search::on(\Lunar\Models\Collection::class)->query('Hoodies')->get();
// Search on Lunar\Models\Product by default.
$results = Search::query('Hoodies')->get();