PHP code example of usamamuneerchaudhary / filament-command-palette

1. Go to this page and download the library: Download usamamuneerchaudhary/filament-command-palette 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/ */

    

usamamuneerchaudhary / filament-command-palette example snippets


use Usamamuneerchaudhary\CommandPalette\FilamentCommandPalettePlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            FilamentCommandPalettePlugin::make(),
            // ...
        ]);
}

'custom_commands' => [
    fn () => [
        \Usamamuneerchaudhary\CommandPalette\Support\CommandItem::make(
            'My Action',
            '/my-url',
            'Custom',
        ),
    ],
],
bash
php artisan vendor:publish --tag=command-palette-config
bash
php artisan command-palette:publish-views
bash
php artisan vendor:publish --tag=command-palette-views