1 | <?php |
||
12 | class RouteTranslationsCacheCommand extends Command |
||
13 | { |
||
14 | use TranslatedRouteCommandContext; |
||
15 | |||
16 | /** |
||
17 | * @var string |
||
18 | */ |
||
19 | protected $name = 'route:trans:cache'; |
||
20 | |||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $description = 'Create a route cache file for faster route registration for all locales'; |
||
25 | |||
26 | /** |
||
27 | * The filesystem instance. |
||
28 | * |
||
29 | * @var Filesystem |
||
30 | */ |
||
31 | protected $files; |
||
32 | |||
33 | /** |
||
34 | * Create a new route command instance. |
||
35 | * |
||
36 | * @param Filesystem $files |
||
37 | */ |
||
38 | public function __construct(Filesystem $files) |
||
44 | |||
45 | /** |
||
46 | * Execute the console command. |
||
47 | */ |
||
48 | public function handle() |
||
56 | |||
57 | /** |
||
58 | * Cache the routes separately for each locale. |
||
59 | */ |
||
60 | protected function cacheRoutesPerLocale() |
||
86 | |||
87 | /** |
||
88 | * Boot a fresh copy of the application and get the routes. |
||
89 | * |
||
90 | * @param string|null $locale |
||
91 | * @return \Illuminate\Routing\RouteCollection |
||
92 | */ |
||
93 | protected function getFreshApplicationRoutes($locale = null) |
||
114 | |||
115 | /** |
||
116 | * Build the route cache file. |
||
117 | * |
||
118 | * @param \Illuminate\Routing\RouteCollection $routes |
||
119 | * @return string |
||
120 | * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException |
||
121 | */ |
||
122 | protected function buildRouteCacheFile(RouteCollection $routes) |
||
147 | } |
||
148 |