PHP code example of pxslip / laravel-scout-solr

1. Go to this page and download the library: Download pxslip/laravel-scout-solr 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/ */

    

pxslip / laravel-scout-solr example snippets


'providers' => [
    // ...other providers
    Scout\Solr\ScoutSolrServiceProvider::class,
]

use Scout\Solr\Searchable;

class MyModel extends Model {
    use Searchable;
    ...
}

// and then to perform a search

MyModel::where(...)
    ->orWhere(...)
    ->facetField(...)