Chron
2 months ago
146
1
Laravel

Is there a way to have two lines of middleware in a construct?

Posted 2 months ago by Chron

Like this?

public function __construct()
{
	$this->middleware('guest')->except('route1');
	$this->middleware(['auth', 'admin'])->except(['route2','route3']);
}

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