Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

artisan command in route

use IlluminateSupportFacadesArtisan;

Route::post('/user/{user}/mail', function ($user) {
    $exitCode = Artisan::call('mail:send', [
        'user' => $user, '--queue' => 'default'
    ]);

    //
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #artisan #command #route
ADD COMMENT
Topic
Name
5+2 =