PHP code example of laravel-enso / searchable

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

    

laravel-enso / searchable example snippets


public $register = [
    Product::class => [
        'group' => 'Product',
        'attributes' => ['name', 'internal_code', 'part_number'],
        'label' => 'internal_code',
        'permissionGroup' => 'products',
    ],
];
bash
php artisan migrate
bash
php artisan vendor:publish --tag=searchable-config
php artisan vendor:publish --tag=searchable-factories