use \PHPLoader\AutoLoader; AutoLoader::register();
use \Illuminate\Database\Capsule\Manager as Capsule; $capsule = new Capsule; $capsule->addConnection([ 'driver' => 'mysql', 'host' => 'localhost', 'database' => 'database_name', 'username' => 'database_user', 'password' => 'database_password', 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', ]); $capsule->setAsGlobal(); $capsule->bootEloquent();This code example uses the Capsule class from the Illuminate\Database package library to set up a database connection and enable the Eloquent ORM. This simplifies the process of working with databases in PHP applications and makes it easier to manage database connections and queries. Package library: Illuminate\Database