graphs
This commit is contained in:
@@ -11,6 +11,9 @@ use Lucent\Commands\CompileSchemas;
|
||||
use Lucent\Commands\RebuildThumbnails;
|
||||
use Lucent\File\FileService;
|
||||
use Lucent\File\ImageService;
|
||||
use Lucent\Query\DatabaseGraph\DatabaseGraph;
|
||||
use Lucent\Query\DatabaseGraph\PgsqlDatabaseGraph;
|
||||
use Lucent\Query\DatabaseGraph\SqliteDatabaseGraph;
|
||||
|
||||
class LucentServiceProvider extends ServiceProvider
|
||||
{
|
||||
@@ -27,6 +30,13 @@ class LucentServiceProvider extends ServiceProvider
|
||||
return new ImageManager(['driver' => 'imagick']);
|
||||
});
|
||||
|
||||
$this->app->bind(DatabaseGraph::class, function () {
|
||||
return match (config("database.lucent")) {
|
||||
"sqlite" => new SqliteDatabaseGraph(),
|
||||
"pgsql" => new PgsqlDatabaseGraph(),
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -37,9 +47,9 @@ class LucentServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
||||
$manifestPath = public_path('vendor/lucent/dist/manifest.json');
|
||||
$manifest = null;
|
||||
if(file_exists($manifestPath)){
|
||||
$manifest = json_decode(file_get_contents(public_path('vendor/lucent/dist/manifest.json')),true);
|
||||
$manifest = null;
|
||||
if (file_exists($manifestPath)) {
|
||||
$manifest = json_decode(file_get_contents(public_path('vendor/lucent/dist/manifest.json')), true);
|
||||
}
|
||||
|
||||
|
||||
@@ -68,7 +78,7 @@ class LucentServiceProvider extends ServiceProvider
|
||||
]);
|
||||
|
||||
$this->publishes([
|
||||
__DIR__.'/../front/dist' => public_path('vendor/lucent/dist'),
|
||||
__DIR__ . '/../front/dist' => public_path('vendor/lucent/dist'),
|
||||
], 'public');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user