1. Go to this page and download the library: Download manggala/laravel-spotlight 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/ */
manggala / laravel-spotlight example snippets
use Manggala\Spotlight\Facades\Spotlight;
use Manggala\Spotlight\Commands\SpotlightCommand;
public function boot(): void
{
Spotlight::register(
SpotlightCommand::make('General Settings')
->description('Manage application branding, mail, and SMTP configurations')
->icon('cog')
->group('Navigation')
->keywords(['setting', 'config', 'smtp', 'mail', 'site name'])
->action(fn () => redirect()->route('settings.general'))
);
SpotlightCommand::make('System Cache Clear')
->description('Flush application cache, routes, and views')
->icon('trash')
->group('Actions')
->action(function () {
Artisan::call('optimize:clear');
return back()->with('success', 'System cache cleared successfully!');
});
}