brightweb/authentication

Advanced authentication package for Laravel 11+ and PHP 8+

v1.0.0 2024-05-20 05:26 UTC

This package is auto-updated.

Last update: 2025-04-07 00:03:54 UTC


README

Wecome to Brightweb Authentication package for Laravel! This package is designed to streamline the authentication process, providing robust middleware for securing both admin and user-specific routes, as well as customizable authentication views.

Installation

To install the Brightweb Authentication package, simply use composer:

composer require brightweb/authentication

Migration

Make sure to run migration or rerun migration for users table to be updated with role.

php artisan migrate

if you have already done the above messioned use

php artisan migrate:fresh

Middleware

This package comes with two built-in middleware 'admin' and 'user'.

This middleware can be used to secure different parts of your application based on user roles.

Admin Middleware

To secure your admin pages, use the 'admin' middleware as shown below:

Route::middleware(['web', 'admin'])->group(function () { // Your admin routes here });

User Middleware

To secure pages such as the cart page and user profile page, use th 'user' middleware as shown below:

Route::middleware(['web', 'user'])->group(function () { // Your user routes here });

Custom Authentication Views

The package includes customizable authentication views that you can publish and modify to your application's design requirements. We call this feature 'brightwebauthconfig'. with this, you can change background and text colors in your config/brightwebauthconfig.php after Publishing config files

Publishing config files

php artisan vendor:publish --tag=brightwebauthconfig

Authentication URLS

This package provides predifined routes for registration,login and logout:

Register: '/register'

Login: '/login'

Logout: '/logout'

These routes are ready to use out of the box, simplifying the setup process.

Conclusion

The Brightweb Authentication package offers a seamless and powerfull solution for managing authentication in your Laravel application.

With easy installation, robust security, middleware, and customizatable views, you can quickly set up a secure and user-frendly authentication system.

Get started today and take your Laravel applications authentication to the next level

License

This package is open-sourced software licensed under the MIT license.

Contributing

We welcome contributions to enhance this package. Please contact us at chikanwazuo@gmail.com

Thank you for choosing BrightWeb Authentication! If you have any questions or need support, please feel free to open an issue on GitHub.