@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | public function initialize(Grid $grid) |
| 66 | 66 | { |
| 67 | 67 | parent::initialize($grid); |
| 68 | - Event::listen(Grid::EVENT_PREPARE, function (Grid $grid) { |
|
| 68 | + Event::listen(Grid::EVENT_PREPARE, function(Grid $grid) { |
|
| 69 | 69 | if ($this->grid !== $grid) { |
| 70 | 70 | return; |
| 71 | 71 | } |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | if (version_compare(Application::VERSION, '5.0.0', '<')) { |
| 158 | 158 | $provider->getPaginationFactory()->setPageName('page_unused'); |
| 159 | 159 | } else { |
| 160 | - Paginator::currentPageResolver(function () { |
|
| 160 | + Paginator::currentPageResolver(function() { |
|
| 161 | 161 | return 1; |
| 162 | 162 | }); |
| 163 | 163 | } |
@@ -272,7 +272,7 @@ discard block |
||
| 272 | 272 | public function getOnFileCreate() |
| 273 | 273 | { |
| 274 | 274 | if ($this->on_file_create === null) { |
| 275 | - $this->on_file_create = function (LaravelExcelWriter $excel) { |
|
| 275 | + $this->on_file_create = function(LaravelExcelWriter $excel) { |
|
| 276 | 276 | $excel->sheet($this->getSheetName(), $this->getOnSheetCreate()); |
| 277 | 277 | }; |
| 278 | 278 | } |
@@ -296,7 +296,7 @@ discard block |
||
| 296 | 296 | public function getOnSheetCreate() |
| 297 | 297 | { |
| 298 | 298 | if ($this->on_sheet_create === null) { |
| 299 | - $this->on_sheet_create = function (LaravelExcelWorksheet $sheet) { |
|
| 299 | + $this->on_sheet_create = function(LaravelExcelWorksheet $sheet) { |
|
| 300 | 300 | $sheet->fromArray($this->getData(), null, 'A1', false, false); |
| 301 | 301 | }; |
| 302 | 302 | } |
@@ -2,7 +2,7 @@ discard block |
||
| 2 | 2 | /** @var Nayjest\Grids\Components\Filters\DateRangePicker $component */ |
| 3 | 3 | $id = uniqid(); |
| 4 | 4 | ?> |
| 5 | -<?php if($component->getLabel()): ?> |
|
| 5 | +<?php if ($component->getLabel()): ?> |
|
| 6 | 6 | <span> |
| 7 | 7 | <span class="glyphicon glyphicon-calendar"></span> |
| 8 | 8 | <?= $component->getLabel() ?> |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | start.val(picker.startDate.format(options.format)); |
| 37 | 37 | var end = $('[name="<?= $component->getEndInputName() ?>"]'); |
| 38 | 38 | end.val(picker.endDate.format(options.format)); |
| 39 | - <?php if($component->isSubmittedOnChange()): ?> |
|
| 39 | + <?php if ($component->isSubmittedOnChange()): ?> |
|
| 40 | 40 | end.get(0).form.submit(); |
| 41 | 41 | <?php endif ?> |
| 42 | 42 | }; |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | $('[name="<?= $component->getStartInputName() ?>"]').val(''); |
| 49 | 49 | $('[name="<?= $component->getEndInputName() ?>"]').val(''); |
| 50 | 50 | |
| 51 | - <?php if($component->isSubmittedOnChange()): ?> |
|
| 51 | + <?php if ($component->isSubmittedOnChange()): ?> |
|
| 52 | 52 | var end = $('[name="<?= $component->getEndInputName() ?>"]'); |
| 53 | 53 | end.get(0).form.submit(); |
| 54 | 54 | <?php endif ?> |
@@ -177,11 +177,11 @@ |
||
| 177 | 177 | $fieldNameParts = explode('.', $fieldName); |
| 178 | 178 | $relationName = $fieldNameParts[0]; |
| 179 | 179 | $endFor = count($fieldNameParts) - 1; |
| 180 | - for ($i = 1;$i < $endFor;$i++) { |
|
| 181 | - $relationName .= '.' . $fieldNameParts[$i]; |
|
| 180 | + for ($i = 1; $i < $endFor; $i++) { |
|
| 181 | + $relationName .= '.'.$fieldNameParts[$i]; |
|
| 182 | 182 | } |
| 183 | 183 | $relatedColumnName = $fieldNameParts[$i]; |
| 184 | - $func = function ($query) use ($relationName, $relatedColumnName, $operator, $value) { |
|
| 184 | + $func = function($query) use ($relationName, $relatedColumnName, $operator, $value) { |
|
| 185 | 185 | $query |
| 186 | 186 | ->where($relatedColumnName, $operator, $value); |
| 187 | 187 | }; |