firstPHP/bootstrap/db.php
2024-03-27 17:24:47 +03:00

19 lines
407 B
PHP
Executable File

<?php
require "vendor/autoload.php";
use Dotenv\Dotenv;
use Illuminate\Database\Capsule\Manager as Capsule;
$dotenv = Dotenv::createImmutable(ROOT_PATH);
$dotenv->load();
$capsule = new Capsule;
$capsule->addConnection([
"driver" => "mysql",
"host" =>"127.0.0.1",
"database" => "forms",
"username" => "root",
"password" => "kali"
]);
$capsule->setAsGlobal();
$capsule->bootEloquent();