Skip to content

2025

How to Create a Gate Middleware: Checking User Permissions

Protecting the admin or backend of an application is one of the most important features of any website. But sometimes it can be a bit cumbersome to write the same boilerplate code for each controller method. In this article, I will show you how to create a gate middleware for checking user permissions via your routes.

CodefyPHP 3.0.1 Maintenance Release

This is a very small maintenance release. In the App\Infrastructure\Services\UserAuth class (located in skeleton), USERSESSID was hardcoded instead of using the user specified cookie name from ./config/auth.php. It also has been added as a shared instance in App\Infrastructure\Providers\RbacServiceProvider.

Another bug that was fixed, was an extra semicolon after an if statement. The bug did not cause any adverse reactions, but deemed it necessary to take care of.

CodefyPHP 3 Is Here

CodefyPHP 3 is the newest release of the PHP web framework for building complex applications. This release includes a plethora of changes, updates, enhancements, and bug fixes. Due to config changes cross many file of the config files, it is recommended that you read thoroughly through the documentation and the skeleton app to ascertain the best way to upgrade your existing applications.