This commit is contained in:
2024-07-10 12:42:50 +03:00
parent e588866a92
commit 1c31a4e5c3
22 changed files with 2474 additions and 91 deletions

View File

@ -1,22 +0,0 @@
<?php
namespace app\models;
use Illuminate\Database\Capsule\Manager as Capsule;
class Database {
public function __construct()
{
$capsule = new Capsule;
$capsule->addConnection([
'driver' => DBDRIVER,
'host' => DBHOST,
'database' => DBNAME,
'username' => DBUSER,
'password' => DBPASS,
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
]);
// Setup the Eloquent ORM…
$capsule->bootEloquent();
}
}

View File

@ -3,7 +3,7 @@ namespace app\models;
use \Illuminate\Database\Eloquent\Model;
class User extends Model {
protected $table = 'Users';
protected $fillable = ['username', 'email', 'password'];
protected $table = 'user';
protected $fillable = ['username', 'email', 'role'];
protected $dates = ['deleted at'];
}