update init category icon_id

This commit is contained in:
xiaomlove
2021-05-29 21:48:50 +08:00
parent 3a54de8be7
commit 8e35dc0886
5 changed files with 35 additions and 11 deletions
+17
View File
@@ -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);
}
}