addConnection([ 'driver' => 'mysql', 'host' => $_ENV['DB_HOST'] ?? '127.0.0.1', 'database' => $_ENV['DB_NAME'] ?? '', 'username' => $_ENV['DB_USER'] ?? '', 'password' => $_ENV['DB_PASS'] ?? '', 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', 'prefix' => '', ]); // Make this Capsule instance available globally via static methods $capsule->setAsGlobal(); // Setup the Eloquent ORM $capsule->bootEloquent(); }