File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change 99
1010class RouteService extends ServiceAbstract implements ServiceInterface
1111{
12- protected $ relativeToBasePath = 'routes ' ;
12+ protected $ relativeToBasePath = 'routes/backpack ' ;
1313
14- private $ adminFile ;
14+ protected $ fileName = 'custom.php ' ;
15+
16+ private $ routeFile ;
1517
1618 public function call ()
1719 {
18- $ this ->adminFile = $ this ->getFilePath ();
20+ $ this ->routeFile = $ this ->getFilePath ();
1921
20- if ($ this ->filesystem ->exists ($ this ->adminFile )) {
22+ if ($ this ->filesystem ->exists ($ this ->routeFile )) {
2123 $ this ->writeFile ();
24+ $ this ->addLatestFileToIdeStack ();
2225 }
23-
24- $ this ->addLatestFileToIdeStack ();
2526 }
2627
2728 private function getRouteName (): string
@@ -43,12 +44,12 @@ private function getControllerName(): string
4344 */
4445 private function writeFile ()
4546 {
46- $ this ->filesystem ->append ($ this ->adminFile , $ this ->getRouteString ());
47+ $ this ->filesystem ->append ($ this ->routeFile , $ this ->getRouteString ());
4748 }
4849
4950 private function getFilePath ()
5051 {
51- return base_path (' routes ' ) . '/admin.php ' ;
52+ return base_path ($ this -> relativeToBasePath ) . '/ ' . $ this -> fileName ;
5253 }
5354
5455 private function getRouteString ()
You can’t perform that action at this time.
0 commit comments