Support the ongoing development of Laravel.io →
Security Views
Last updated 1 year ago.
0

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.

https://github.com/cartalyst/sentry

0

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.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

mosfetish mosfetish Joined 12 Feb 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.