laravel - How to deny access to certain routes / views for users -
i trying deny access users other 1 id=1 (in case it's admin) 'cpanel' (admin panel) view. trying achieve acl, somehow think not correct way.
this want in pseudocode version
if (isadmin()) renderpage() else print "you not allowed view page" reading documentation found line declared in custom controller
$this->authorize('update', $post); where 'update' ability defined elsewhere, , $post seems model (use app\post) don't know how implement. don't think laravel's documentation covers how implement models authorization.
how can authorize view? it's laravel 5.2
Comments
Post a Comment