System Requirements
Before installing Laravel Permission, ensure your system meets the following requirements:PHP Version
Minimum Required: PHP 8.4 or higher
Laravel Version
Supported Versions: Laravel 12.x and 13.x
Using an older version of Laravel? Check the compatibility table below for the appropriate package version.
Required Dependencies
Laravel Permission depends on several Laravel components that are typically included in a standard Laravel installation:illuminate/auth
Laravel’s authentication system for managing guards and user authentication
illuminate/database
Laravel’s database layer for Eloquent models and migrations
illuminate/container
Laravel’s service container for dependency injection
illuminate/contracts
Laravel’s contract interfaces
Database Requirements
Laravel Permission supports the following database systems:- MySQL 5.7+
- PostgreSQL 10.0+
- SQLite 3.8.8+
- SQL Server 2017+
- MariaDB 10.2+
Database Configuration
Ensure your.env file has the correct database configuration:
.env
Authentication Setup
You need a User model with authentication configured. If you haven’t set this up yet:Laravel Breeze (Recommended for new projects)
Laravel Jetstream
Manual Setup
If you prefer a manual setup, ensure you have:- A
userstable in your database - A
Usermodel inapp/Models/User.php - Authentication guards configured in
config/auth.php
Version Compatibility
Different versions of Laravel Permission support different versions of Laravel and PHP:| Laravel Permission | Laravel | PHP |
|---|---|---|
| 7.x | 12.x - 13.x | 8.4+ |
| 6.x | 11.x | 8.2+ |
| 5.x | 9.x - 10.x | 8.0+ |
| 4.x | 8.x | 7.3+ |
| 3.x | 7.x | 7.2+ |
Installing a Specific Version
To install a specific version for your Laravel installation:Development Environment
For the best development experience, we recommend:Local Development Tools
Laravel Herd
The fastest way to run Laravel on macOS
Laravel Valet
Lightweight development environment for macOS
Laravel Sail
Docker-powered development environment
Homestead
Pre-packaged Vagrant development environment
Recommended Tools
- Composer 2.x - PHP dependency manager
- Git - Version control
- IDE/Editor - PhpStorm, VS Code, or Sublime Text with PHP extensions
Optional Dependencies
Laravel Passport (for API Authentication)
If you’re using Laravel Passport for API authentication:config/permission.php
Laravel Octane (for High Performance)
If you’re using Laravel Octane, enable the reset listener:config/permission.php
Composer Configuration
Ensure yourcomposer.json has the correct minimum stability:
composer.json
Checking Your Environment
Here’s a quick checklist to verify your environment is ready:Common Issues
PHP version too old
PHP version too old
Error:
requires php ^8.4Solution: Upgrade your PHP version to 8.4 or higher. On Ubuntu/Debian:Laravel version incompatible
Laravel version incompatible
Error:
laravel/framework[v11.x] require spatie/laravel-permission ^6.0Solution: Install the correct package version for your Laravel version:Missing authentication
Missing authentication
Error: User model not found or authentication not configuredSolution: Install Laravel Breeze or set up authentication:
Database connection failed
Database connection failed
Error: Database connection errors during installationSolution: Verify your
.env database credentials and ensure the database exists:Next Steps
Once you’ve verified all prerequisites are met:Installation
Install Laravel Permission in your application
Basic Concepts
Learn about roles and permissions