Generate Laravel adminpanel in minutes - try our QuickAdminPanel!

Home

Laravel: Roles/Permissions for Individual Fields

Laravel has a great roles/permissions system out-of-the-box, based on Gates and Policies, and it’s usually used to access the whole menu item or some action, like create/delete. But what if you need to restrict a certain DB COLUMN from being edited? Like, for example, “published” checkbox for articles, that can be ticked only by Administrators, and not by Authors. Let’s see how to do it.

Laravel: How to Make Menu Item Active by URL/Route

Probably one of the most common operation on every website is to assign “active” CSS class to the menu item which is currently opened. There are quite a few ways to detect that status, let’s review them. We assume that the code will be based…