forked from projects/fipamo
ro
b527884c51
page editing was missing the selector to choose what template the page was using, so a theme class was created to handle retrieving and sorting what classes where avaiable in the themes directory still looking for twig files because themes haven't been converted over yet, but one step at a time
51 lines
1.3 KiB
PHP
51 lines
1.3 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;
|
|
|
|
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());
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Bootstrap services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
$this->app->bind(PageRepositoryInterface::class, PageRepository::class);
|
|
}
|
|
}
|