Follow these steps to set up your Laravel project locally:
- PHP (version specified in your
composer.json
file) - Composer - Package manager for PHP
- A webserver (like Apache, Nginx, etc.)
- MySQL (Or any database that you prefer)
- Clone the repository
git clone {repository_path}
- Navigate to the project directory
cd {project-directory}
- Install dependencies
composer install
- Copy .env.example to .env
cp .env.example .env
- Set up your environment variables in .env file
- Generate application key
php artisan key:generate
- Run the database migrations (Set the database connection in .env before migrating)
php artisan migrate
- Serve the Laravel application
php artisan serve
- Visit the application in your browser at http://localhost:8000
The Laravel framework is open-sourced software licensed under the MIT license.
Last Edtion - 2022