https://github.com/dickidarmawansaputra/laravel-frankenphp
Laravel integration with FrankenPHP
https://github.com/dickidarmawansaputra/laravel-frankenphp
frankenphp laravel
Last synced: about 1 month ago
JSON representation
Laravel integration with FrankenPHP
- Host: GitHub
- URL: https://github.com/dickidarmawansaputra/laravel-frankenphp
- Owner: dickidarmawansaputra
- Created: 2025-02-01T10:49:50.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-02T01:40:42.000Z (over 1 year ago)
- Last Synced: 2025-10-06T23:33:40.931Z (8 months ago)
- Topics: frankenphp, laravel
- Language: PHP
- Homepage:
- Size: 81.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Laravel ❤️ FrankenPHP

## Stress Testing Tool
- [Pest Stress Testing](https://pestphp.com/docs/stress-testing)
- Command Stress Test
Stress testing with duration `10` seconds & concurrent requests `300`
```bash
./vendor/bin/pest stress http://localhost --duration=10 --concurrency=300
```
## Docker
Serving a Laravel web application with FrankenPHP is as easy as mounting the project in the /app directory of the official Docker image.
```bash
docker run -p 80:80 -p 443:443 -p 443:443/udp -v $PWD:/app dunglas/frankenphp
```
### Result Stress Test

## Local Installation
Run your Laravel projects with FrankenPHP from your local machine.
### Install FrankenPHP
- Install FrankenPHP
```bash
curl https://frankenphp.dev/install.sh | sh
mv frankenphp /usr/local/bin/
```
- Add the following configuration to a file named `Caddyfile` in the root directory of your Laravel project:
```caddyfile
{
frankenphp
}
# The domain name of your server
localhost {
# Set the webroot to the public/ directory
root * public/
# Enable compression (optional)
encode zstd br gzip
# Execute PHP files from the public/ directory and serve assets
php_server {
try_files {path} index.php
}
}
```
### Result Stress Test
- Command
```bash
php artisan serve
```

- Command
```bash
franken run
```

## Laravel Octane
Using Laravel Octane
### Install Laravel Octane via the Composer package manager
```bash
composer require laravel/octane
```
### Result Stress Test
- Command
```bash
php artisan octane:frankenphp
```

- Command:
```bash
php artisan octane:frankenphp --host=127.0.0.1 --port=8000 --workers=4
```

## Running Octane With Standalone Binaries
Run package Laravel Octane apps as standalone binaries.
```bash
PATH="$PWD:$PATH" frankenphp php-cli artisan octane:frankenphp
```
### Result Stress Test