app->runningInConsole()) { $this->loadMigrationsFrom(__DIR__ . '/../../database/migrations'); $this->loadSeeders([StreaksSeeder::class]); $this->commands([RemindStreaksCommand::class]); } $this->withRouting( web: __DIR__ . '/../../routes/web.php', api: __DIR__ . '/../../routes/api.php', commands: __DIR__ . '/../../routes/console.php', channels: __DIR__ . '/../../routes/channels.php', ); // Le streak se met à jour à chaque séance terminée (événement porté par la couche tracking). Event::listen(WorkoutCompleted::class, UpdateStreakOnWorkoutCompleted::class); } public function register(): void { $this->app->singleton(StreakService::class); } }