User permissions is the ideal approach when dealing with partial views. Something like:
@if ($user->hasAccess('admin'))
@include('admin.dashboard')
@endif
Sentry is the most popular package to implement user permissions in Laravel.
The package should be updated to L5 in a few days.
Thanks.
I find myself doing this kind of thing quite often. Therefore I'm wondering if I'm falling into a common error in allowing data to be displayed in the view based upon auth status. That is, should I have a different application structure that simply points users to views that are entirely suitable for their auth status.
Any pointers would be appreciated.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community