laravel set up

"Passionate web developer specializing in PHP, Laravel, and Filament, dedicated to building elegant, efficient, and scalable web solutions. Experienced in deploying projects and exploring new technologies to bring ideas to life."
How to Install a Laravel Project (Step-by-Step Guide)
Laravel is one of the most popular PHP frameworks for building modern web applications. In this guide, we’ll walk through the process of installing a fresh Laravel project, from setting up the environment to running your first application.
1. Environment Setup
Before installing Laravel, we need PHP, Composer, and the Laravel installer. If you already have these installed, you can skip this step.
Install PHP and Composer
Mac Users
Run the following command in your terminal:/bin/bash -c "$(curl -fsSL https://php.new/install/mac/8.4)"Windows Users
Run PowerShell as Administrator and execute:Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://php.new/install/windows/8.4'))Linux Users
Run the following command in your terminal:/bin/bash -c "$(curl -fsSL https://php.new/install/linux/8.4)"
2. Install the Laravel Installer
Once PHP and Composer are ready, install the Laravel installer globally using Composer:
composer global require laravel/installer
Make sure Composer’s global bin directory is in your system’s PATH so that the laravel command is recognized.
3. Create a New Laravel Project
You can now create a new Laravel project by running:
laravel new create-project
This will generate a fresh Laravel application inside the create-project folder.
4. Run the Laravel Project
Navigate to your project directory and start the local development server with:
php artisan serve
Your application will now be accessible at:
http://127.0.0.1:8000
5. Connect to a Database
Most Laravel applications use a database. To configure the connection:
Open the
.envfile in the root of your Laravel project.Update the following values with your database details:
DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=your_database_name DB_USERNAME=your_username DB_PASSWORD=your_passwordRun migrations to set up the default Laravel tables:
php artisan migrate