forked from projects/fipamo
ro
7024285b70
the first part of the page editing API is working again after porting it over form the old fipamo build. a few changes where made to make the code a big more managable, but the end to end process works for updating pages. the remaining page editing methods will be activated after the rendering engine is in place because that's going to be a pretty siginficant effort. but this is a big step.
60 lines
1.5 KiB
PHP
60 lines
1.5 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;
|
|
|
|
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();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Bootstrap services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
$this->app->bind(PageRepositoryInterface::class, PageRepository::class);
|
|
}
|
|
}
|