System Requirements
Before starting, ensure your system meets these requirements:PHP
Version 8.2 or higher
Composer
Latest stable version
Node.js
Version 16.x or higher
Database
MySQL 5.7+ or SQLite 3
Installation Methods
Method 1: Quick Installation (Recommended)
Install PHP and Composer
Use the official PHP installer for your operating system:Verify the installation:
Method 2: Manual Installation
For more control over the installation process:Install PHP manually
Download and install PHP 8.2+ from php.netEnsure these extensions are enabled:
php-mbstringphp-xmlphp-pdophp-curlphp-zipphp-tokenizer
Install Composer
Download Composer from getcomposer.org
Install Node.js
Download Node.js from nodejs.org
Environment Configuration
Basic Configuration
Your.env file contains essential configuration. Here are the key sections:
Application Settings
APP_ENV: Set tolocalfor development,productionfor productionAPP_DEBUG: Set tofalsein production to hide error detailsAPP_LOCALE: Default language (es=Spanish, en=English)
Database Configuration
API Documentation
http://localhost:8000/docs/api
Advanced Configuration
Session and Cache
Queue Configuration
The
composer run dev command automatically starts a queue worker for background jobs.Mail Configuration
Database Setup
Using SQLite (Development)
SQLite requires no additional setup:database/database.sqlite.
Using MySQL (Production)
Running the Application
Development Mode
The recommended way to run the application in development:- PHP server on port 8000
- Queue worker for background jobs
- Vite dev server for frontend assets
You can customize the number of PHP workers by setting
PHP_CLI_SERVER_WORKERS in your .env file (default: 4).Individual Services
You can also run services individually:Production Mode
For production deployment:Testing the Installation
Run Tests
The project includes functional tests:API Verification
Test key endpoints:Troubleshooting
Common Issues
Port 8000 already in use
Port 8000 already in use
Change the port when starting the server:Update
APP_URL in your .env:Permission denied on storage directories
Permission denied on storage directories
Fix file permissions:On Linux/Mac, you may need to change ownership:
Database connection failed
Database connection failed
For SQLite:For MySQL:
Composer install fails
Composer install fails
Clear Composer cache and try again:If you encounter memory limit errors:
JWT secret not set
JWT secret not set
Generate the JWT secret:This adds the secret to your
.env file. If the command doesn’t exist:NPM install errors
NPM install errors
Try clearing the NPM cache:
Getting Help
If you continue to experience issues:Check Logs
View Laravel logs at
storage/logs/laravel.logGitHub Issues
Report bugs on the GitHub repository
Laravel Docs
Consult Laravel documentation
Enable Debug Mode
Set
APP_DEBUG=true in .env for detailed errorsNext Steps
Now that you have the API installed:API Documentation
Explore all available endpoints
Authentication
Learn about JWT authentication
Configuration
Advanced configuration options
Deployment
Deploy to production