path('routes.php'); } public function publicRoutes(): ?string { return $this->path('public-routes.php'); } public function commands(): array { return []; } /** * Tables (without the prefix) this module needs; `manager:doctor` checks that they exist. * * @return list */ public function tables(): array { return []; } /** * Steps this module adds to the tour. Each: `title` and `text` (English, translated through `__()`), an optional `image` (one of * the pictures of the tour, `MascotController::NAMES`), `menu` (the short route name of a menu item to point at, like `reviews.index`) * and `permission` (the step is left out for an account without it). The contract `Module` does not know this: a module without it adds none. * * @return list */ public function tutorial(): array { return []; } public function actions(): array { return []; } public function views(): array { return []; } public function middleware(): array { return []; } public function boot(): void {} public function migrations(): ?string { return $this->path('migrations'); } private function path(string $name): ?string { $path = dirname((new \ReflectionClass($this))->getFileName()).'/'.$name; return file_exists($path) ? $path : null; } }