File: D:/HostingSpaces/SBogers10/wingssprayer.komma.pro/app/Providers/AppServiceProvider.php
<?php
namespace App\Providers;
use App\Auth\Authmailservice;
use App\Components\Attributables\AttributableService;
use App\Components\Attributables\AttributableServiceInterface;
use App\Components\ComponentArea\ComponentAreaService;
use App\Components\ComponentArea\ComponentAreaServiceInterface;
use App\Routes\RouteService;
use App\Site\Site;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\ServiceProvider;
use Komma\KMS\Auth\AuthMailServiceInterface;
use Komma\KMS\Core\HouseKeeping\HouseKeeper;
use Komma\KMS\Sites\Models\SiteInterface;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application authentication / authorization services.
*
* @return void
*/
public function boot()
{
$this->app->bind(ComponentAreaServiceInterface::class, ComponentAreaService::class);
$this->app->bind(AttributableServiceInterface::class, AttributableService::class);
$this->app->bind(SiteInterface::class, Site::class);
//Core helper services
// $this->app->bind(ComponentableServiceInterface::class, ComponentableService::class); //TODO. I think this implementation became obsolete
$this->app->bind(AuthMailServiceInterface::class, AuthMailService::class);
HouseKeeper::mapHousekeepingService('routes', RouteService::class);
// You can use this to check if the modifier array isset and automatic call the atomic modifiers helper
Blade::directive('modifiers', function ($expression) {
// Strip single or double quotes
$baseClass = str_replace('"', "", $expression);
$baseClass = str_replace("'", "", $baseClass);
// We echo the modifiers through the Modifiers helper
// And we burn the defined modifiers
return '<?php if(isset($modifiers)){ \Atomic::modifiers("'.$baseClass.'", $modifiers); } $modifiers = []; ?>';
});
}
}