app->bind( UserRepository::class, EloquentUserRepository::class, ); $this->app->bind( SessionRepository::class, EloquentSessionRepository::class, ); $this->app->bind( EmailConfirmationTokenRepository::class, EloquentEmailConfirmationTokenRepository::class, ); $this->app->bind(Emailer::class, LaravelEmailer::class); $this->app->bind(EmailFactory::class, LaravelEmailFactory::class); $this->app->bind( SetRepository::class, EloquentSetRepository::class, ); $this->app->bind( ElementRepository::class, EloquentElementRepository::class, ); $this->app->bind( ScheduleRepository::class, EloquentScheduleRepository::class, ); $this->app->bind(PasswordHasher::class, BcryptPasswordHasher::class); $this->app->bind(TokenGenerator::class, RandomTokenGenerator::class); $this->app->bind(Clock::class, SystemClock::class); } /** * Bootstrap any application services. */ public function boot(): void { $this->configureDefaults(); } /** * Configure default behaviors for production-ready applications. */ protected function configureDefaults(): void { Date::use(CarbonImmutable::class); DB::prohibitDestructiveCommands( app()->isProduction(), ); Password::defaults(fn (): ?Password => app()->isProduction() ? Password::min(12) ->mixedCase() ->letters() ->numbers() ->symbols() ->uncompromised() : null, ); } }