commands([ TranslatorCommand::class, AssetsBuild::class, ]); foreach (config('xshop.payment.gateways') as $gateway){ /** @var \App\Contracts\Payment $gateway */ $gateway::registerService(); } \Route::bind('gateway', function ($gatewayName) { return app("$gatewayName-gateway"); }); } /** * Bootstrap any application services. */ public function boot(): void { /** @var Router $router */ $router = $this->app['router']; $router->pushMiddlewareToGroup('web', Acl::class); Paginator::useBootstrap(); Carbon::macro('jdate', function ($format, $tr_num = 'fa') { $dt = TDate::GetInstance(); return $dt->PDate($format, self::this()->timestamp); }); Carbon::macro('ldate', function ($format) { if (self::this()->timestamp == 0){ return null; } if (config('app.locale') == 'fa'){ $format = str_replace('-','/',$format); return self::this()->jdate($format); }else{ return date($format,self::this()->timestamp); } }); Part::observe(PartObsever::class); Setting::observe(SettingObsever::class); } }