forked from projects/fipamo
ro
6ce5e91624
ported over the new file uploader from the old build and made it a service make for from some additonal file processing i.e. image optimization or video converstion before it is saved to the system
65 lines
1.7 KiB
PHP
65 lines
1.7 KiB
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
use App\Repositories\PageRepository;
|
|
use App\Interfaces\PageRepositoryInterface;
|
|
use App\Services\SettingsService;
|
|
use App\Services\AuthService;
|
|
use App\Services\ContentService;
|
|
use App\Services\PaginateService;
|
|
use App\Services\ThemeService;
|
|
use App\Services\DocService;
|
|
use App\Services\FileUploadService;
|
|
|
|
class FipamoServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register services.
|
|
*/
|
|
public function register(): void
|
|
{
|
|
//services
|
|
$this->app->bind(SettingsService::class, function ($app) {
|
|
return new SettingsService();
|
|
});
|
|
|
|
$this->app->bind(AuthService::class, function ($app) {
|
|
return new AuthService(new SettingsService());
|
|
});
|
|
|
|
$this->app->bind(ContentService::class, function ($app) {
|
|
return new ContentService();
|
|
});
|
|
|
|
$this->app->bind(ThemeService::class, function ($app) {
|
|
return new ThemeService(new SettingsService());
|
|
});
|
|
|
|
$this->app->bind(PaginateService::class, function ($app) {
|
|
return new PaginateService(new ContentService());
|
|
});
|
|
|
|
$this->app->bind(StringService::class, function ($app) {
|
|
return new StringService();
|
|
});
|
|
|
|
$this->app->bind(DocService::class, function ($app) {
|
|
return new DocService();
|
|
});
|
|
|
|
$this->app->bind(FileUploadService::class, function ($app) {
|
|
return new FileUploadService();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Bootstrap services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
$this->app->bind(PageRepositoryInterface::class, PageRepository::class);
|
|
}
|
|
}
|