lundi 27 août 2018

Laravel Auth::user->("name)

I have two types of users: admin and user. In template i want to show users names, but if controller protected

$this->middleware('auth:admin');

in template i see two admins names, if controller hasn't 'auth:admin' i see two users names. How can i show one admin name and one user name.

My template code:

@guest
   //some code
@else

 @auth('admin')
    
 @endauth
 @auth('web')
    
 @endauth
@endguest



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire