lucent config

This commit is contained in:
2023-10-06 13:07:09 +03:00
parent 341ad267a5
commit 9bbe5ee9b4
9 changed files with 95 additions and 71 deletions
+8 -3
View File
@@ -7,7 +7,7 @@ use Illuminate\Support\Facades\View;
use Illuminate\Support\ServiceProvider;
use Intervention\Image\ImageManager;
use Lucent\Channel\ChannelService;
use Lucent\Commands\CompileConfig;
use Lucent\Commands\CompileSchemas;
use Lucent\Commands\RebuildThumbnails;
use Lucent\File\FileService;
use Lucent\File\ImageService;
@@ -36,7 +36,12 @@ class LucentServiceProvider extends ServiceProvider
public function boot(Router $router): void
{
$manifest = json_decode(file_get_contents(public_path('vendor/lucent/dist/manifest.json')),true);
$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);
}
$router->aliasMiddleware('lucent.auth', \Lucent\Http\Middleware\AuthMiddleware::class);
$router->aliasMiddleware('lucent.guest', \Lucent\Http\Middleware\GuestMiddleware::class);
@@ -49,7 +54,7 @@ class LucentServiceProvider extends ServiceProvider
if ($this->app->runningInConsole()) {
$this->commands([
CompileConfig::class,
CompileSchemas::class,
RebuildThumbnails::class,
]);
}