mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 03:57:22 +08:00
update init category icon_id
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace Nexus\Database;
|
||||
|
||||
use Illuminate\Database\Capsule\Manager as Capsule;
|
||||
|
||||
class DB
|
||||
{
|
||||
private $driver;
|
||||
@@ -209,4 +211,19 @@ class DB
|
||||
return $result;
|
||||
}
|
||||
|
||||
public static function bootEloquent(array $config)
|
||||
{
|
||||
$capsule = new Capsule;
|
||||
$connectionName = self::ELOQUENT_CONNECTION_NAME;
|
||||
$capsule->addConnection($config, $connectionName);
|
||||
$capsule->setAsGlobal();
|
||||
$capsule->bootEloquent();
|
||||
$capsule->getConnection($connectionName)->enableQueryLog();
|
||||
}
|
||||
|
||||
public static function schema(): \Illuminate\Database\Schema\Builder
|
||||
{
|
||||
return Capsule::schema(self::ELOQUENT_CONNECTION_NAME);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user