8 months ago

Execute artisan vendor:publish programmatically

Posted 8 months ago by yassineqoraiche

I'm trying to publish vendor mail markdown assets using the artisan command vendor:publish --tag=laravel-mail programmatically.

I try the following but not work (with no errors):

Route::get('newmailable', function() {

    $exitCode = Artisan::call('vendor:publish', [
        '--tag' => 'laravel-mail'

    return $exitCode;


I'm using Laravel 5.7

Please sign in or create an account to participate in this conversation.