Navigate to the root of your Laravel project and clone the repository:
git clone https://github.com/Kamleshpaul/setup-laravel-with-frankenphp.git
Move the cloned repository to root directory:
mv setup-laravel-with-frankenphp/{Caddyfile,download.sh} ./ && rm -rf setup-laravel-with-frankenphp
Make the download script executable:
chmod +x download.sh
Run the download script:
./download.sh
This script will download composer.phar
for Composer and FrankenPHP for php-cli
, php
, and Caddy server
.
To install all the dependency, use the following command:
./frankenphp php-cli ./composer.phar install
To run the FrankenPHP server, use the following command:
./frankenphp run
After running the server, open your web browser and navigate to https://localhost
Add this in .gitignore
frankenphp
composer.phar
./frankenphp php-cli ./composer.phar (install | update | dump-autoload | require | remove)
./frankenphp php-cli artisan about
NOTE: It installs PHP 8.3. If you need another version of PHP, you can compile and use FrankenPHP and change the Composer version.