Generate Laravel adminpanel in minutes - try our QuickAdminPanel!

Home

Laravel Custom Validation Rule: Max Word Count

Laravel provides a lot of validation rules, but what if you need to add your own? We’ll show you how to do it, with the rule “max words count is 500”, and we will also make this 500 number as a parameter.

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…