Support the ongoing development of Laravel.io →
Authentication Views Blade
Last updated 2 years ago.
0

This is already available

if (Auth::check()) {
    // The user is logged in...
}

You can get the current user via

Auth::user()

https://laravel.com/docs/5.2/authentication

0

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.

Last updated 8 years ago.
0

yes, it's possible. You can pass variables to view any where you want like this.

Illuminate\Support\Facades\View::share('key', 'value');
0

Sign in to participate in this thread!

Eventy

Your banner here too?

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.