File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed
Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,6 @@ public function generateController()
4040 $ template = str_replace ('{{modelNameLower}} ' , strtolower ($ this ->model ), $ template );
4141 $ template = str_replace ('{{modelNameCamel}} ' , Str::camel ($ this ->model ), $ template );
4242 $ template = str_replace ('{{modelNameSpace}} ' , is_dir (base_path ('app/Models ' )) ? 'Models \\' .$ this ->model : $ this ->model , $ template );
43-
4443 file_put_contents (base_path ('app/Http/Controllers/Api/ ' .$ this ->model .'Controller.php ' ), $ template );
4544 $ this ->result = true ;
4645 }
@@ -52,7 +51,7 @@ public function generateResource()
5251 {
5352 $ this ->result = false ;
5453 if (! file_exists (base_path ('app/Http/Resources/ ' .$ this ->model .'Resource.php ' ))) {
55- $ model = ( is_dir (base_path ('app/Models ' ) )) ? app ('App \\Models \\' .$ this ->model ) : app ('App \\' .$ this ->model );
54+ $ model = is_dir (base_path ('app/Models ' )) ? app ('App \\Models \\' .$ this ->model ) : app ('App \\' .$ this ->model );
5655 $ columns = $ model ->getConnection ()->getSchemaBuilder ()->getColumnListing ($ model ->getTable ());
5756 $ print_columns = null ;
5857 foreach ($ columns as $ key => $ column ) {
@@ -91,7 +90,6 @@ public function generateRoute()
9190 file_put_contents (base_path ('routes/api.php ' ), $ route , FILE_APPEND );
9291 $ this ->result = true ;
9392 }
94-
9593 return $ this ->result ;
9694 }
9795
You can’t perform that action at this time.
0 commit comments