@@ -50,38 +50,38 @@ protected function createBaseModel(): void
5050 protected function createControllers (): void
5151 {
5252 // requests
53- $ filePath = $ this ->targetPath . '/Requests/Store ' . $ this -> model . ' Request .php ' ;
53+ $ filePath = $ this ->targetPath . '/Requests/StoreRequest .php ' ;
5454 $ this ->createFileFromStub ('request ' , $ filePath );
5555
56- $ filePath = $ this ->targetPath . '/Requests/Update ' . $ this -> model . ' Request .php ' ;
56+ $ filePath = $ this ->targetPath . '/Requests/UpdateRequest .php ' ;
5757 $ this ->createFileFromStub ('request ' , $ filePath );
5858
5959 // resources
6060 $ filePath = $ this ->targetPath . '/Resources/ ' . $ this ->model . 'Resource.php ' ;
6161 $ this ->createFileFromStub ('resource ' , $ filePath );
6262
6363 // controllers
64- $ filePath = $ this ->targetPath . '/Controllers/Index ' . $ this -> model . ' Controller .php ' ;
65- $ this ->createFileFromStub ('controller ' , $ filePath );
64+ $ filePath = $ this ->targetPath . '/Controllers/IndexController .php ' ;
65+ $ this ->createFileFromStub ('index. controller ' , $ filePath );
6666
67- $ filePath = $ this ->targetPath . '/Controllers/Show ' . $ this -> model . ' Controller .php ' ;
67+ $ filePath = $ this ->targetPath . '/Controllers/ShowController .php ' ;
6868 $ this ->createFileFromStub ('controller ' , $ filePath );
6969
70- $ filePath = $ this ->targetPath . '/Controllers/Update ' . $ this -> model . ' Controller .php ' ;
70+ $ filePath = $ this ->targetPath . '/Controllers/UpdateController .php ' ;
7171 $ this ->createFileFromStub ('controller ' , $ filePath );
7272
73- $ filePath = $ this ->targetPath . '/Controllers/Store ' . $ this -> model . ' Controller .php ' ;
73+ $ filePath = $ this ->targetPath . '/Controllers/StoreController .php ' ;
7474 $ this ->createFileFromStub ('controller ' , $ filePath );
7575
76- $ filePath = $ this ->targetPath . '/Controllers/Destroy ' . $ this -> model . ' Controller .php ' ;
76+ $ filePath = $ this ->targetPath . '/Controllers/DestroyController .php ' ;
7777 $ this ->createFileFromStub ('controller ' , $ filePath );
7878 }
7979
8080 protected function createFileFromStub (string $ type , string $ filePath ): void
8181 {
8282 $ template = str_replace (
8383 ['{{ namespace }} ' , '{{ class }} ' ],
84- [" Modules \\ $ this ->namespace \\" . ucfirst (Str:: plural ( $ type )) , $ this ->model ],
84+ [$ this ->namespace , $ this ->model ],
8585 $ this ->getStub ($ type )
8686 );
8787
0 commit comments