The skeleton webpatser/fledge is a Laravel 13 application that uses webpatser/fledge-framework instead of laravel/framework. It is currently distributed through Git and is not on Packagist, so composer create-project is not available yet. Clone it instead.
Requirements
- PHP 8.6
- The
intlextension, recommended; without it IDN hosts are not converted to punycode and are rejected, andSORT_LOCALE_STRINGsorting compares byte-wise - Composer 2.x
Create the application
git clone https://github.com/webpatser/fledge my-appcd my-appcomposer installcp .env.example .envphp artisan key:generatephp artisan serve
The skeleton's composer.json also defines a setup script that installs dependencies, copies .env.example, generates the key, runs migrations and builds the assets:
composer setup
Verify the install
The framework ships a script that checks whether Fledge or stock Laravel is installed:
bash vendor/webpatser/fledge-framework/bin/verify-fledge-install.sh
On Fledge it prints a line like this and exits with 0:
OK running Fledge framework v13.43.0.3
If vendor/laravel/framework is present instead, it warns that you are not running Fledge and exits with 1. It exits with 2 when there is no vendor/ directory or neither framework package is found.
What the skeleton configures
The skeleton is a standard Laravel 13 layout with a few Fledge defaults:
REDIS_CLIENT=fledgein.env.example, andfledgeas the fallback inconfig/database.php. See Redis client.- Preconfigured
fledge-mysql,fledge-mariadbandfledge-pgsqlconnections inconfig/database.php.DB_CONNECTIONdefaults tosqlitein.env.example. webpatser/fledge-fiberandwebpatser/fledge-frameworkinrequire.
Redis client
The fledge client is the non-blocking client from fledge-fiber. Cache, session, queue and lock traffic suspends the current Fiber instead of blocking the process. To use the phpredis extension instead, install it and set:
REDIS_CLIENT=phpredis
Non-blocking database connections
Set DB_CONNECTION=fledge-mysql in .env to use the non-blocking MySQL driver. The available connections are fledge-mysql, fledge-mariadb and fledge-pgsql. They read the same DB_* variables as the stock connections, except DB_URL: the fiber connections have no url key, because Laravel's URL parser replaces the connection's driver with the URL scheme and a mysql:// URL would turn them into blocking PDO connections. Set DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME and DB_PASSWORD instead.
Upgrading an app created from an older skeleton
Earlier skeleton versions shipped config that no Fledge package registers. If your app was created from one of them:
- Rename the
amphp-mysql,amphp-mariadbandamphp-pgsqlconnections inconfig/database.php, and theirdrivervalues, tofledge-mysql,fledge-mariadbandfledge-pgsql. UpdateDB_CONNECTIONand anyDB::connection('amphp-...')calls to match. REDIS_CLIENT=amphphas no connector. Change it tofledge, or tophpredisif you want the extension.- Remove the
urlkey from the fiber connections and setDB_HOST,DB_PORT,DB_DATABASE,DB_USERNAMEandDB_PASSWORDinstead.