Support the ongoing development of Laravel.io →
posted 9 years ago
Packages
Last updated 2 years ago.
0

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() {
//...
});
Last updated 9 years ago.
0

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! :)

0

Sign in to participate in this thread!

Eventy

Your banner here too?

MrToLLi mrtolli Joined 13 Jan 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.