File: D:/HostingSpaces/SBogers10/farmfun.komma.pro/app/Providers/AppServiceProvider.php
<?php
namespace App\Providers;
use App\Komma\Locations\LocationService;
use App\Komma\ProductCategories\ProductCategoryService;
use App\Komma\Questions\QuestionService;
use App\Komma\SearchAmountOfPersons\SearchAmountOfPersonsService;
use App\Komma\ShoppingCart\Interfaces\ShoppingCartInterface;
use App\Komma\ShoppingCart\ShoppingCart;
use App\Komma\Sites\Kms\SiteService;
use App\Komma\Sites\SiteServiceInterface;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\ServiceProvider;
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 = []; ?>';
});
}
/**
* Register any application services.
*
* @return void
*/
public function register()
{
if ($this->app->environment('local', 'testing')) {
// $this->app->register(\Laravel\Dusk\DuskServiceProvider::class); //Leave FQCN like it is //Original provider
// $this->app->register(\App\Komma\Kms\QualityAssurance\DuskServiceProvider::class); //Leave FQCN like it is
// $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class); //Leave FQCN like it is
}
}
/**
* All of the container singletons that should be registered.
*
* @var array
*/
public $singletons = [
SiteServiceInterface::class => SiteService::class,
ShoppingCartInterface::class => ShoppingCart::class,
SearchAmountOfPersonsService::class => SearchAmountOfPersonsService::class,
ProductCategoryService::class => ProductCategoryService::class,
LocationService::class => LocationService::class,
QuestionService::class => QuestionService::class,
];
}