@@ 134-147 (lines=14) @@ | ||
131 | * |
|
132 | * TODO:: Support multiple languages |
|
133 | */ |
|
134 | private function createLanguageFiles() |
|
135 | { |
|
136 | $this->createFromStub( |
|
137 | __DIR__ . '/../../stubs/resource.stub', |
|
138 | $directory = 'resources/lang/' . (config('app.locale')), |
|
139 | $file = $this->variables['%RESOURCE_NAME_PLURAL%'] . '.php', |
|
140 | array_merge($this->variables, ['%COLUMNS%' => $this->buildLanguageFilesColumns()]) |
|
141 | ); |
|
142 | ||
143 | $this->info(sprintf( |
|
144 | 'Resource languages file created successfully, [%s/%s]', |
|
145 | $directory, $file |
|
146 | )); |
|
147 | } |
|
148 | ||
149 | /** |
|
150 | * Create datatable class |
|
@@ 152-165 (lines=14) @@ | ||
149 | /** |
|
150 | * Create datatable class |
|
151 | */ |
|
152 | private function createDatatable() |
|
153 | { |
|
154 | $this->createFromStub( |
|
155 | __DIR__ . '/../../stubs/resource-datatable.stub', |
|
156 | $directory = 'app/DataTables/', |
|
157 | $file = Str::studly($this->variables['%RESOURCE_NAME_SINGULAR%'] . 'DataTable') . '.php', |
|
158 | array_merge($this->variables, ['%COLUMNS%' => $this->buildDatatableColumns()]) |
|
159 | ); |
|
160 | ||
161 | $this->info(sprintf( |
|
162 | 'Datatable class created successfully, [%s%s]', |
|
163 | $directory, $file |
|
164 | )); |
|
165 | } |
|
166 | ||
167 | /** |
|
168 | * Create controller class |