@@ -19,7 +19,7 @@ public function __construct()
19
19
20
20
$ this ->path = $ this ->config ->paths ->views ;
21
21
$ this ->templateType = config ('laravel_generator.templates ' , 'adminlte-templates ' );
22
- $ this ->templateViewPath = $ this ->templateType . '::templates ' ;
22
+ $ this ->templateViewPath = $ this ->templateType . '::templates ' ;
23
23
}
24
24
25
25
public function generate ()
@@ -35,7 +35,7 @@ public function generate()
35
35
// $this->config->addDynamicVariable('$FILES$', ", 'files' => true");
36
36
// }
37
37
38
- $ this ->config ->commandComment (PHP_EOL . 'Generating Views... ' );
38
+ $ this ->config ->commandComment (PHP_EOL . 'Generating Views... ' );
39
39
40
40
if ($ this ->config ->getOption ('views ' )) {
41
41
$ viewsToBeGenerated = explode (', ' , $ this ->config ->getOption ('views ' ));
@@ -94,7 +94,7 @@ private function generateTable()
94
94
throw new Exception ('Invalid Table Type ' );
95
95
}
96
96
97
- g_filesystem ()->createFile ($ this ->path . 'table.blade.php ' , $ templateData );
97
+ g_filesystem ()->createFile ($ this ->path . 'table.blade.php ' , $ templateData );
98
98
99
99
$ this ->config ->commandInfo ('table.blade.php created ' );
100
100
}
@@ -108,7 +108,7 @@ private function generateDataTableActions()
108
108
{
109
109
$ templateData = view ($ this ->templateViewPath .'.scaffold.table.datatable.actions ' )->render ();
110
110
111
- g_filesystem ()->createFile ($ this ->path . 'datatables_actions.blade.php ' , $ templateData );
111
+ g_filesystem ()->createFile ($ this ->path . 'datatables_actions.blade.php ' , $ templateData );
112
112
113
113
$ this ->config ->commandInfo ('datatables_actions.blade.php created ' );
114
114
}
@@ -124,18 +124,18 @@ private function generateBladeTableBody(): string
124
124
125
125
$ tableBodyFields [] = view ($ this ->templateViewPath .'.scaffold.table.blade.cell ' , [
126
126
'modelVariable ' => $ this ->config ->modelNames ->camel ,
127
- 'fieldName ' => $ field ->name ,
127
+ 'fieldName ' => $ field ->name ,
128
128
])->render ();
129
129
}
130
130
131
131
$ tableBodyFields = implode (infy_nl_tab (1 , 5 ), $ tableBodyFields );
132
132
133
133
$ paginate = view ($ this ->templateViewPath .'.scaffold.paginate ' )->render ();
134
134
135
- return view ($ this ->templateViewPath . '.scaffold.table.blade.body ' , [
135
+ return view ($ this ->templateViewPath . '.scaffold.table.blade.body ' , [
136
136
'fieldHeaders ' => $ this ->generateTableHeaderFields (),
137
- 'fieldBody ' => $ tableBodyFields ,
138
- 'paginate ' => $ paginate
137
+ 'fieldBody ' => $ tableBodyFields ,
138
+ 'paginate ' => $ paginate,
139
139
])->render ();
140
140
}
141
141
@@ -168,7 +168,7 @@ private function generateTableHeaderFields(): string
168
168
);
169
169
} else {
170
170
$ headerFields [] = view (
171
- $ this ->templateType . '::templates.scaffold.table.blade.header ' ,
171
+ $ this ->templateType . '::templates.scaffold.table.blade.header ' ,
172
172
$ field ->variables ()
173
173
)->render ();
174
174
}
@@ -196,7 +196,7 @@ private function generateIndex()
196
196
$ templateData = view ($ this ->templateViewPath .'.scaffold.index ' , ['table ' => $ tableReplaceString ])
197
197
->render ();
198
198
199
- g_filesystem ()->createFile ($ this ->path . 'index.blade.php ' , $ templateData );
199
+ g_filesystem ()->createFile ($ this ->path . 'index.blade.php ' , $ templateData );
200
200
201
201
$ this ->config ->commandInfo ('index.blade.php created ' );
202
202
}
@@ -264,7 +264,7 @@ private function generateFields()
264
264
// }
265
265
}
266
266
267
- g_filesystem ()->createFile ($ this ->path . 'fields.blade.php ' , implode (infy_nls (2 ), $ htmlFields ));
267
+ g_filesystem ()->createFile ($ this ->path . 'fields.blade.php ' , implode (infy_nls (2 ), $ htmlFields ));
268
268
$ this ->config ->commandInfo ('field.blade.php created ' );
269
269
}
270
270
@@ -278,11 +278,11 @@ private function generateViewComposer($tableName, $variableName, $columns, $sele
278
278
279
279
$ viewServiceProvider = new ViewServiceProviderGenerator ();
280
280
$ viewServiceProvider ->generate ();
281
- $ viewServiceProvider ->addViewVariables ($ tableName . '.fields ' , $ variableName , $ columns , $ selectTable , $ modelName );
281
+ $ viewServiceProvider ->addViewVariables ($ tableName. '.fields ' , $ variableName , $ columns , $ selectTable , $ modelName );
282
282
283
283
return str_replace (
284
284
'$INPUT_ARR$ ' ,
285
- '$ ' . $ variableName ,
285
+ '$ ' . $ variableName ,
286
286
$ fieldTemplate
287
287
);
288
288
}
@@ -291,15 +291,15 @@ private function generateCreate()
291
291
{
292
292
$ templateData = view ($ this ->templateViewPath .'.scaffold.create ' )->render ();
293
293
294
- g_filesystem ()->createFile ($ this ->path . 'create.blade.php ' , $ templateData );
294
+ g_filesystem ()->createFile ($ this ->path . 'create.blade.php ' , $ templateData );
295
295
$ this ->config ->commandInfo ('create.blade.php created ' );
296
296
}
297
297
298
298
private function generateUpdate ()
299
299
{
300
300
$ templateData = view ($ this ->templateViewPath .'.scaffold.edit ' )->render ();
301
301
302
- g_filesystem ()->createFile ($ this ->path . 'edit.blade.php ' , $ templateData );
302
+ g_filesystem ()->createFile ($ this ->path . 'edit.blade.php ' , $ templateData );
303
303
$ this ->config ->commandInfo ('edit.blade.php created ' );
304
304
}
305
305
@@ -316,15 +316,15 @@ private function generateShowFields()
316
316
$ fieldsStr .= PHP_EOL .PHP_EOL ;
317
317
}
318
318
319
- g_filesystem ()->createFile ($ this ->path . 'show_fields.blade.php ' , $ fieldsStr );
319
+ g_filesystem ()->createFile ($ this ->path . 'show_fields.blade.php ' , $ fieldsStr );
320
320
$ this ->config ->commandInfo ('show_fields.blade.php created ' );
321
321
}
322
322
323
323
private function generateShow ()
324
324
{
325
325
$ templateData = view ($ this ->templateViewPath .'.scaffold.show ' )->render ();
326
326
327
- g_filesystem ()->createFile ($ this ->path . 'show.blade.php ' , $ templateData );
327
+ g_filesystem ()->createFile ($ this ->path . 'show.blade.php ' , $ templateData );
328
328
$ this ->config ->commandInfo ('show.blade.php created ' );
329
329
}
330
330
@@ -343,7 +343,7 @@ public function rollback($views = [])
343
343
if (!empty ($ views )) {
344
344
$ files = [];
345
345
foreach ($ views as $ view ) {
346
- $ files [] = $ view . '.blade.php ' ;
346
+ $ files [] = $ view. '.blade.php ' ;
347
347
}
348
348
}
349
349
@@ -353,7 +353,7 @@ public function rollback($views = [])
353
353
354
354
foreach ($ files as $ file ) {
355
355
if ($ this ->rollbackFile ($ this ->path , $ file )) {
356
- $ this ->config ->commandComment ($ file . ' file deleted ' );
356
+ $ this ->config ->commandComment ($ file. ' file deleted ' );
357
357
}
358
358
}
359
359
}
0 commit comments