I have used kodeine for Laravel user roles and permissions. No problem in installation and all the migrations. In documentation of kodeine/laravel-acl there is Blade Template Extension so the code to check users role is :
// @if(Auth::check() && Auth::user()->is('admin|moderator'))
// would be
@role('admin|moderator')
// content allowed for admin's only
@endrole
// @if(Auth::check() && Auth::user()->can('create.user|edit.user''))
// would be
@permission('create.user|edit.user')
// content if user can edit or create users.
@endpermission
I used the same code but it doesn't works at all. when i use
@role('admin')
<h1>admin</h1>
@endrole
it displays @role('teacher')
Note: I'm using laravel 5. I have migrated the database and added data as well. like roles , permissions and all .
You should use master branch.
"kodeine/laravel-acl": "dev-master"
Blade template has been added only on master branch, it'll be backported on the week.