tomatophp/tomato-artisan-module
A Tomato PHP module that brings Laravel Artisan into your admin panel, letting you browse and run commands from a web interface instead of the terminal. Integrates with Tomato's modular ecosystem for quick setup and management.
composer require tomatophp/tomato-artisan-module
config, migrations, translations):
php artisan vendor:publish --provider="TomatoPHP\TomatoArtisan\TomatoArtisanServiceProvider"
AdminPanelProvider):
->plugin(\TomatoPHP\TomatoArtisan\TomatoArtisanPlugin::make())
config/tomato-artisan.php — this is where you control which commands are exposed, whether the module is enabled, and any authorization gates. Then open the module's Filament page/resource to see the default listing of whitelisted commands.First use case: expose a handful of safe operational commands (e.g. cache:clear, optimize, queue:restart) to admins so they don't need SSH. Add those command names to the config whitelist and verify they run from the panel.
Gate::define('run-artisan') check so that only trusted roles see the module. Combine with Filament's ->authorize() on the plugin/resource.;, |, &&, $(), backticks).migrate on big schemas, backups) in a queued job dispatched from the Filament action, and poll for output. Don't block the request with Artisan::call() from a web action.->everyFiveMinutes() calling the same command registry).abort_unless(app()->isLocal() || Gate::allows('run-artisan'))). Treat a misconfigured whitelist as a full compromise.php artisan optimize:clear or reload. If a command "doesn't show up," clear caches first.migrate on production, db:wipe, etc.) will block a web request indefinitely. Exclude them or pass --force/--no-interaction deliberately.Artisan::output() returns a string, so long output can exceed memory or truncate. If the module streams output, check the chunk/buffer config; otherwise paginate or write to a log file and link it.exec, Process), output and exit codes behave differently than Artisan::call() — and shell escaping becomes your responsibility. Prefer the facade where possible.config/tomato-artisan.php won't take effect under config:cache. Run php artisan config:clear in dev; in deploy pipelines cache after editing."^1.0") and read the source of the execution path once before wiring it into production — the security posture matters more here than in most packages.How can I help you explore Laravel packages today?