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()
40
40
$ template = str_replace ('{{modelNameLower}} ' , strtolower ($ this ->model ), $ template );
41
41
$ template = str_replace ('{{modelNameCamel}} ' , Str::camel ($ this ->model ), $ template );
42
42
$ template = str_replace ('{{modelNameSpace}} ' , is_dir (base_path ('app/Models ' )) ? 'Models \\' .$ this ->model : $ this ->model , $ template );
43
-
44
43
file_put_contents (base_path ('app/Http/Controllers/Api/ ' .$ this ->model .'Controller.php ' ), $ template );
45
44
$ this ->result = true ;
46
45
}
@@ -52,7 +51,7 @@ public function generateResource()
52
51
{
53
52
$ this ->result = false ;
54
53
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 );
56
55
$ columns = $ model ->getConnection ()->getSchemaBuilder ()->getColumnListing ($ model ->getTable ());
57
56
$ print_columns = null ;
58
57
foreach ($ columns as $ key => $ column ) {
@@ -91,7 +90,6 @@ public function generateRoute()
91
90
file_put_contents (base_path ('routes/api.php ' ), $ route , FILE_APPEND );
92
91
$ this ->result = true ;
93
92
}
94
-
95
93
return $ this ->result ;
96
94
}
97
95
You can’t perform that action at this time.
0 commit comments