@@ -50,7 +50,7 @@ public function handle()
5050
5151 protected function createModel ($ modelName , $ attributes )
5252 {
53- $ stub = file_get_contents (app_path ( ' Crud /model.stub ' ));
53+ $ stub = file_get_contents (base_path ( ' vendor/jasrys/laravel-crud/stubs /model.stub ' ));
5454
5555 $ stub = $ this ->replacePlaceholdersWithModelName ($ stub , $ modelName );
5656
@@ -65,7 +65,7 @@ protected function createModel($modelName, $attributes)
6565
6666 protected function createController ($ modelName )
6767 {
68- $ stub = file_get_contents (app_path ( ' Crud /controller.stub ' ));
68+ $ stub = file_get_contents (base_path ( ' vendor/jasrys/laravel-crud/stubs /controller.stub ' ));
6969
7070 $ stub = $ this ->replacePlaceholdersWithModelName ($ stub , $ modelName );
7171
@@ -87,7 +87,7 @@ protected function createFeatureTests($modelName)
8787
8888 protected function createViewingModelTest ($ modelName )
8989 {
90- $ stub = file_get_contents (app_path ( ' Crud /viewing_test.stub ' ));
90+ $ stub = file_get_contents (base_path ( ' vendor/jasrys/laravel-crud/stubs /viewing_test.stub ' ));
9191
9292 $ stub = $ this ->replacePlaceholdersWithModelName ($ stub , $ modelName );
9393
@@ -99,7 +99,7 @@ protected function createViewingModelTest($modelName)
9999
100100 protected function createCreatingModelTest ($ modelName )
101101 {
102- $ stub = file_get_contents (app_path ( ' Crud /creating_test.stub ' ));
102+ $ stub = file_get_contents (base_path ( ' vendor/jasrys/laravel-crud/stubs /creating_test.stub ' ));
103103
104104 $ stub = $ this ->replacePlaceholdersWithModelName ($ stub , $ modelName );
105105
@@ -111,7 +111,7 @@ protected function createCreatingModelTest($modelName)
111111
112112 protected function createEditingModelTest ($ modelName )
113113 {
114- $ stub = file_get_contents (app_path ( ' Crud /editing_test.stub ' ));
114+ $ stub = file_get_contents (base_path ( ' vendor/jasrys/laravel-crud/stubs /editing_test.stub ' ));
115115
116116 $ this ->replacePlaceholdersWithModelName ($ stub , $ modelName );
117117
@@ -123,7 +123,7 @@ protected function createEditingModelTest($modelName)
123123
124124 protected function createDeletingModelTest ($ modelName )
125125 {
126- $ stub = file_get_contents (app_path ( ' Crud /deleting_test.stub ' ));
126+ $ stub = file_get_contents (base_path ( ' vendor/jasrys/laravel-crud/stubs /deleting_test.stub ' ));
127127
128128 $ this ->replacePlaceholdersWithModelName ($ stub , $ modelName );
129129
@@ -155,7 +155,7 @@ protected function createFeatureTestSubDirectoryFor($modelName)
155155
156156 protected function createModelFactory ($ modelName , $ attributes )
157157 {
158- $ stub = file_get_contents (app_path ( ' Crud /factory.stub ' ));
158+ $ stub = file_get_contents (base_path ( ' vendor/jasrys/laravel-crud/stubs /factory.stub ' ));
159159
160160 $ stub = $ this ->replacePlaceholdersWithModelName ($ stub , $ modelName );
161161
@@ -170,7 +170,7 @@ protected function createModelFactory($modelName, $attributes)
170170
171171 protected function createMigration ($ modelName , $ attributes )
172172 {
173- $ stub = file_get_contents (app_path ( ' Crud /migration.stub ' ));
173+ $ stub = file_get_contents (base_path ( ' vendor/jasrys/laravel-crud/stubs /migration.stub ' ));
174174
175175 $ stub = $ this ->replacePlaceholdersWithModelName ($ stub , $ modelName );
176176
@@ -212,7 +212,7 @@ public function createViews($modelName, $attributes)
212212
213213 protected function createCreateView ($ modelName )
214214 {
215- $ stub = file_get_contents (app_path ( ' Crud /create_view.stub ' ));
215+ $ stub = file_get_contents (base_path ( ' vendor/jasrys/laravel-crud/stubs /create_view.stub ' ));
216216
217217 $ stub = $ this ->replacePlaceholdersWithModelName ($ stub , $ modelName );
218218
@@ -221,7 +221,7 @@ protected function createCreateView($modelName)
221221
222222 protected function createEditView ($ modelName )
223223 {
224- $ stub = file_get_contents (app_path ( ' Crud /edit_view.stub ' ));
224+ $ stub = file_get_contents (base_path ( ' vendor/jasrys/laravel-crud/stubs /edit_view.stub ' ));
225225
226226 $ stub = $ this ->replacePlaceholdersWithModelName ($ stub , $ modelName );
227227
@@ -230,7 +230,7 @@ protected function createEditView($modelName)
230230
231231 protected function createShowView ($ modelName )
232232 {
233- $ stub = file_get_contents (app_path ( ' Crud /show_view.stub ' ));
233+ $ stub = file_get_contents (base_path ( ' vendor/jasrys/laravel-crud/stubs /show_view.stub ' ));
234234
235235 $ stub = $ this ->replacePlaceholdersWithModelName ($ stub , $ modelName );
236236
@@ -239,7 +239,7 @@ protected function createShowView($modelName)
239239
240240 protected function createIndexView ($ modelName )
241241 {
242- $ stub = file_get_contents (app_path ( ' Crud /index_view.stub ' ));
242+ $ stub = file_get_contents (base_path ( ' vendor/jasrys/laravel-crud/stubs /index_view.stub ' ));
243243
244244 $ stub = $ this ->replacePlaceholdersWithModelName ($ stub , $ modelName );
245245
@@ -248,7 +248,7 @@ protected function createIndexView($modelName)
248248
249249 protected function createFormView ($ modelName , $ attributes )
250250 {
251- $ stub = file_get_contents (app_path ( ' Crud /form_view.stub ' ));
251+ $ stub = file_get_contents (base_path ( ' vendor/jasrys/laravel-crud/stubs /form_view.stub ' ));
252252
253253 $ stub = $ this ->replacePlaceholdersWithModelName ($ stub , $ modelName );
254254
@@ -268,7 +268,7 @@ protected function createFormView($modelName, $attributes)
268268
269269 protected function createModelView ($ modelName , $ attributes )
270270 {
271- $ stub = file_get_contents (app_path ( ' Crud /model_view.stub ' ));
271+ $ stub = file_get_contents (base_path ( ' vendor/jasrys/laravel-crud/stubs /model_view.stub ' ));
272272
273273 $ stub = $ this ->replacePlaceholdersWithModelName ($ stub , $ modelName );
274274
0 commit comments