PHP code example of synergitech / laravel-typesense-tools

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

    

synergitech / laravel-typesense-tools example snippets


\Illuminate\Support\Facades\Artisan::call(
    command: 'search:switch-alias',
    outputBuffer: $this->command->getOutput()->getOutput(),
);
bash
php artisan search:setup --only-index
php artisan search:setup --flush
bash
php artisan search:switch-alias
bash
php artisan search:cleanup