A Laravel project featuring an advanced authentication system integrated with roles and permissions management. This setup ensures secure access control for your application and allows assigning users specific roles with granular permissions.
- User authentication (Login, Registration, Password Reset)
- Role-based access control (RBAC)
- Assign multiple roles to users
- Fine-grained permissions system
- Middleware to restrict access based on roles or permissions
- Easy-to-use UI for role and permission management
- Built on Spatie Laravel Permission
Ensure you have the following installed:
- PHP >= 8.1
- Composer
- Laravel 10.x
- MySQL / MariaDB or other supported database
- Node.js and npm (for frontend assets)
Follow these steps to set up the project:
- Clone the Repository
git clone https://github.com/ariful305/Laravel-Auth-with-Roles-and-Permission.git cd Laravel-Auth-with-Roles-and-Permission
- Install Dependencies
composer install
- Environment Setup
cp .env.example .env
- Run Migrations and Seeders
php artisan migrate --seed
- Run the Application
php artisan serve
Access the app in your browser at http://localhost:8000.
- Credentials
Email = admin@gmail.com username = admin password = admin123
Visit the /login route to authenticate as a user. Admins can access the Role and Permission management dashboard. Use predefined roles and permissions or create custom ones via the admin UI.
Contributions are welcome! Please fork the repository, create a feature branch, and submit a pull request.
This project is licensed under the Apache-2.0 license.
- Laravel
- Spatie Laravel Permission
- UniSharp laravel filemanager
If you have any questions or issues, feel free to open an issue.