This is already available
if (Auth::check()) {
// The user is logged in...
}
You can get the current user via
Auth::user()
That's true, and I know that, but I'm looking to set a $style variable based on the user's details and then use it in my master blade view and throughout various other views.
yes, it's possible. You can pass variables to view any where you want like this.
Illuminate\Support\Facades\View::share('key', 'value');
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community