File: D:/HostingSpaces/debout/debout.nl/app/Providers/AppServiceProvider.php
<?php
namespace App\Providers;
use App\Auth\AuthMailService;
use App\Auth\AuthMailServiceInterface;
use App\Components\Attributables\AttributableService;
use App\Components\Attributables\AttributableServiceInterface;
use App\Components\ComponentArea\ComponentAreaService;
use App\Components\ComponentArea\ComponentAreaServiceInterface;
use App\Site\Site;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\ServiceProvider;
use Komma\KMS\Sites\Models\SiteInterface;
class AppServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
if($this->app->environment('local'))
{
$this->app->register('Barryvdh\Debugbar\ServiceProvider');
}
// 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 dubble 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 = []; ?>';
});
$this->app->bind(AuthMailServiceInterface::class, AuthMailService::class);
$this->app->bind(ComponentAreaServiceInterface::class, ComponentAreaService::class);
$this->app->bind(AttributableServiceInterface::class, AttributableService::class);
$this->app->bind(SiteInterface::class, Site::class);
}
/**
* Register any application services.
*
* @return void
*/
public function register()
{
// $this->app->singleton(SiteServiceInterface::class, SiteService::class);
if ($this->app->environment('local', 'testing')) {
$this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
}
}
}