# Update system packages sudo apt update -y # Install required dependencies sudo apt install -y software-properties-common sudo add-apt-repository ppa:ondrej/php sudo apt update -y # Install PHP 8.3.0 sudo apt install -y php8.3 php8.3-cli php8.3-fpm php8.3-mysql php8.3-zip php8.3-gd php8.3-mbstring php8.3-json php8.3-xml php8.3-curl # Install Composer sudo apt install -y composer # Install Laravel Installer globally composer global require laravel/installer # Add Composer's global bin directory to the system PATH echo 'export PATH="$PATH:$HOME/.composer/vendor/bin"' >> ~/.bashrc source ~/.bashrc # Create a new Laravel project laravel new mylaravelapp # Navigate to the Laravel project directory cd mylaravelapp # Set the appropriate permissions sudo chown -R www-data:www-data storage bootstrap/cache sudo chmod -R 775 storage bootstrap/cache # Create a new environment file and generate application key cp .env.example .env php artisan key:generate # Install npm dependencies and compile assets (optional) # npm install # npm run dev Your Laravel installation and setup completed successfully! cd example-app ./vendor/bin/sail up