1. Go to this page and download the library: Download chapdel/laravel-meilitools 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/ */
chapdel / laravel-meilitools example snippets
use Dwarf\MeiliTools\Contracts\Indexes\MeiliSettings;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Laravel\Scout\Searchable;
class Article extends Model implements MeiliSettings
{
use Searchable;
use SoftDeletes;
/**
* {@inheritdoc}
*/
public function meiliSettings(): array
{
// When using soft deletes '__soft_deleted' will automatically be added to filterable attributes.
return ['filterableAttributes' => ['status']];
}
}