Hi, I had the same problem.
Try to add your Artisan::call-function to routes callback-function. Or a much better way createa a new route-middleware and add your call-function to it.
Don't know why, but it worked for me.
<?php namespace App\Middleware;
use Closure;
class Prepare {
public function handle($request, Closure $next)
{
if(config('app.debug')) {
\Artisan::call('vendor:publish', ['--force' => true]);
}
return $next($request);
}
}
Route::group(['middleware' => 'App\Middleware\Prepare'], function() {
//...
});
Hey vanderb, sorry for the really really late reply! This worked like a charm, shame it can't work in the actual service provider!
Many thanks! :)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community