@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | - /** |
|
2 | + /** |
|
3 | 3 | * Helper Functions for Lagaren |
4 | 4 | * Autoloads via LaragenServiceProvider |
5 | 5 | */ |
@@ -36,10 +36,10 @@ |
||
36 | 36 | public function register() |
37 | 37 | { |
38 | 38 | // Register Intervention Provider and Facade |
39 | - $this->app->register(ImageServiceProvider::class); |
|
39 | + $this->app->register(ImageServiceProvider::class); |
|
40 | 40 | AliasLoader::getInstance()->alias('Image', Image::class); |
41 | 41 | |
42 | - $this->app->register("\App\Providers\LaragenRouteServiceProvider"); |
|
42 | + $this->app->register("\App\Providers\LaragenRouteServiceProvider"); |
|
43 | 43 | |
44 | 44 | $this->app->bind('command.laragen:make', Generate::class); |
45 | 45 |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | $fullFilePath = $this->getPath("app/Http/Requests/Backend/").$this->module->getModelName()."Request".".php"; |
20 | 20 | file_put_contents($fullFilePath, $controllerTemplate); |
21 | 21 | return $fullFilePath; |
22 | - } |
|
22 | + } |
|
23 | 23 | |
24 | 24 | protected function getRules() |
25 | 25 | { |
@@ -53,5 +53,5 @@ discard block |
||
53 | 53 | } |
54 | 54 | $delimiter = ",\n{$columnOptions->getTabs(3)}"; |
55 | 55 | return (implode($delimiter, $validation)); |
56 | - } |
|
56 | + } |
|
57 | 57 | } |
@@ -13,9 +13,9 @@ discard block |
||
13 | 13 | public function generate() |
14 | 14 | { |
15 | 15 | |
16 | - $viewsToBeGenerated = ['index', 'create', 'edit']; |
|
16 | + $viewsToBeGenerated = ['index', 'create', 'edit']; |
|
17 | 17 | |
18 | - $generatedFiles = []; |
|
18 | + $generatedFiles = []; |
|
19 | 19 | |
20 | 20 | foreach ($viewsToBeGenerated as $view) { |
21 | 21 | $viewTemplate = $this->buildTemplate('backend/views/' . $view, [ |
@@ -44,26 +44,26 @@ discard block |
||
44 | 44 | $this->insertIntoFile( |
45 | 45 | $mainMenuFile, |
46 | 46 | '{{-- Main Menu --}}', |
47 | - "\n".'<li class="nav-item dropdown"> |
|
47 | + "\n".'<li class="nav-item dropdown"> |
|
48 | 48 | <a href="#" class="nav-link has-dropdown" data-toggle="dropdown"><i class="fas fa-columns"></i> <span> '.str_plural($this->module->getModelName()).' </span></a> |
49 | 49 | <ul class="dropdown-menu"> |
50 | 50 | <li><a class="nav-link" href="{{ route("backend.'.$this->module->getModuleName().'.create") }}"> Add new '.str_plural($this->module->getModelName()).'</a></li> |
51 | 51 | <li><a class="nav-link" href="{{ route("backend.'.$this->module->getModuleName().'.index") }}">All '.str_plural($this->module->getModelName()).'</a></li> |
52 | 52 | </ul> |
53 | 53 | </li>' |
54 | - ); |
|
54 | + ); |
|
55 | 55 | $generatedFiles = array_merge($generatedFiles, $this->formGenerateCreate()); |
56 | 56 | return $generatedFiles; |
57 | - } |
|
57 | + } |
|
58 | 58 | |
59 | - public function getHeadings(){ |
|
59 | + public function getHeadings(){ |
|
60 | 60 | $columns = $this->module->getBackendColumnTitles(); |
61 | 61 | $headings= ""; |
62 | 62 | foreach ($columns as $column) { |
63 | 63 | $headings .= "<th>".$column."</th>"; |
64 | 64 | } |
65 | - return $headings; |
|
66 | - } |
|
65 | + return $headings; |
|
66 | + } |
|
67 | 67 | |
68 | 68 | public function formGenerateCreate() |
69 | 69 | { |