This may help. As stevemo/cpanel uses Cartalyst Sentry package. You can try with following method.
$user = Sentry::getUser();
if ( $user->hasAccess('groupname') )
{
//Enable button
} else {
//Disable button
}
The first line will get the current user and next line will check for the group permission. For more detail Check Sentry.
use this in your view
@if(Auth::check())
<button type="button" disabled="disabled">Disabled button</button>
@else
<button type="button">Enabled button</button></p>
@endif
Thanks! Sikandhar.
Thanks swgj19. but stevemo/cpanel uses Sentry.
Hi Laravel Genius ! I am in efforts to make a simple Laravel Admin section for anyone to integrate in their Website. Please contribute your efforts laraadmin - on GitHub Regards, Rizwan Ranjha
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community