user login status / group assignment in view
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
user login status / group assignment in view
Hi,
how can we check in Laravel 6 if a user is already logged-in and if so, to which user groups he belongs in a view eg. in items-body-list.php?
In Laravel blade I would check the login-status with something like:
Thank you
how can we check in Laravel 6 if a user is already logged-in and if so, to which user groups he belongs in a view eg. in items-body-list.php?
In Laravel blade I would check the login-status with something like:
Code: Select all
@if (Auth::check())
//show logged in detail-link
@else
//show logged out detail-link
@endif
Re: user login status / group assignment in view
You can use normal PHP statements:
The Blade compiler produces the same output.
Code: Select all
<?php if(Auth::check()) : ?>
//show logged in detail-link
<?php else : ?>
//show logged out detail-link
<?php endif ?>
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star