Skip to content

Instantly share code, notes, and snippets.

@tojibon tojibon/api.php
Last active Apr 17, 2019

Embed
What would you like to do?
Laravel fire an Artisan command from an HTTP route by using Artisan facade
<?php
Route::get('/foo', function()
{
$exitCode = Artisan::call('command:name', ['--option' => 'foo']);
//
});
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.