PHP code example of thedoctor0 / laravel-scout-sonic
1. Go to this page and download the library: Download thedoctor0/laravel-scout-sonic library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?phprequire_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
// an ISO 639-3 locale code eg. eng for English (if set, the locale must be a valid ISO 639-3 code; if set to none, lexing will be disabled; if not set, the locale will be guessed from text)publicfunctiongetSonicLocale(){
return'none';
}
/*
* Package Service Providers...
*/
james2doyle\SonicScout\Providers\SonicScoutServiceProvider::class,
/*
|--------------------------------------------------------------------------
| Sonic Configuration
|--------------------------------------------------------------------------
|
| Here you may configure your Sonic settings.
|
*/'sonic' => [
'address' => \env('SONIC_ADDRESS', 'localhost'),
'port' => \env('SONIC_PORT', 1491),
'password' => \env('SONIC_PASSWORD'),
'connection_timeout' => \env('SONIC_CONNECTION_TIMEOUT', 10),
'read_timeout' => \env('SONIC_READ_TIMEOUT', 5)
],
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.