This commit is contained in:
2023-10-04 13:32:30 +03:00
parent 215d238505
commit 1ca5f4e521
82 changed files with 519 additions and 1889 deletions
+9
View File
@@ -5,9 +5,11 @@ namespace Lucent;
use Illuminate\Routing\Router;
use Illuminate\Support\Facades\View;
use Illuminate\Support\ServiceProvider;
use Intervention\Image\ImageManager;
use Lucent\Channel\ChannelService;
use Lucent\Commands\CompileConfig;
use Lucent\Commands\RebuildThumbnails;
use Lucent\File\FileService;
use Lucent\File\ImageService;
class LucentServiceProvider extends ServiceProvider
@@ -21,6 +23,11 @@ class LucentServiceProvider extends ServiceProvider
return ChannelService::fromConfig();
});
$this->app->bind(ImageManager::class, function () {
return new ImageManager(['driver' => 'imagick']);
});
}
/**
@@ -36,6 +43,7 @@ class LucentServiceProvider extends ServiceProvider
$this->loadRoutesFrom(__DIR__ . '/Http/web.php');
$this->loadRoutesFrom(__DIR__ . '/Http/api.php');
$this->loadMigrationsFrom(__DIR__ . '/Database/migrations');
if ($this->app->runningInConsole()) {
$this->commands([
@@ -45,6 +53,7 @@ class LucentServiceProvider extends ServiceProvider
}
View::share('image', app()->make(ImageService::class));
View::share('file', app()->make(FileService::class));
$this->publishes([
__DIR__ . '/Config/main.php' => config_path('lucent.php'),