@@ -87,8 +87,8 @@ |
||
| 87 | 87 | */ |
| 88 | 88 | public function addConditionToSearchQuery(Builder $query, Field $field, $value) : Builder |
| 89 | 89 | { |
| 90 | - $query->where(function ($query) use($field, $value) { |
|
| 91 | - foreach ((array) $value as $_value) { |
|
| 90 | + $query->where(function($query) use($field, $value) { |
|
| 91 | + foreach ((array)$value as $_value) { |
|
| 92 | 92 | $formattedValue = $this->getFormattedValueToSearch($_value); |
| 93 | 93 | $query = $query->orWhere($field->column, $formattedValue); |
| 94 | 94 | } |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | // If the form is not valid display a notification |
| 35 | - if (! $this->isValid()) { |
|
| 35 | + if (!$this->isValid()) { |
|
| 36 | 36 | ucnotify(uctrans('notification.form.not_valid', $module), 'error'); |
| 37 | 37 | } |
| 38 | 38 | |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | $domainsTreeHtml = '<ul class="tree tree-level-0">'; |
| 210 | 210 | |
| 211 | 211 | $rootDomains = app('uccello')->getRootDomains(); |
| 212 | - foreach($rootDomains as $root) { |
|
| 212 | + foreach ($rootDomains as $root) { |
|
| 213 | 213 | |
| 214 | 214 | $descendants = $root->findDescendants()->get(); |
| 215 | 215 | |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | |
| 218 | 218 | $html = $tree->render( |
| 219 | 219 | 'ul', |
| 220 | - function ($node) { |
|
| 220 | + function($node) { |
|
| 221 | 221 | if (auth()->user()->hasRoleOnDomain($node)) { |
| 222 | 222 | $currentClass = ''; |
| 223 | 223 | if ($node->id === $this->domain->id) { |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | $this->registerTranslations(); |
| 28 | 28 | $this->registerPublishing(); |
| 29 | 29 | |
| 30 | - $this->loadViewsFrom(__DIR__ . '/../../resources/views', 'uccello'); |
|
| 30 | + $this->loadViewsFrom(__DIR__.'/../../resources/views', 'uccello'); |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | /** |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | private function registerMigrations() |
| 39 | 39 | { |
| 40 | 40 | if ($this->app->runningInConsole()) { |
| 41 | - $this->loadMigrationsFrom(__DIR__ . '/../../database/migrations'); |
|
| 41 | + $this->loadMigrationsFrom(__DIR__.'/../../database/migrations'); |
|
| 42 | 42 | } |
| 43 | 43 | } |
| 44 | 44 | |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | */ |
| 50 | 50 | private function registerTranslations() |
| 51 | 51 | { |
| 52 | - $this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', 'uccello'); |
|
| 52 | + $this->loadTranslationsFrom(__DIR__.'/../../resources/lang', 'uccello'); |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | /** |
@@ -62,18 +62,18 @@ discard block |
||
| 62 | 62 | if ($this->app->runningInConsole()) { |
| 63 | 63 | // Publish assets |
| 64 | 64 | $this->publishes([ |
| 65 | - __DIR__ . '/../../public' => public_path('vendor/uccello/uccello'), |
|
| 66 | - __DIR__ . '/../../public/images/vendor' => public_path('images/vendor') |
|
| 65 | + __DIR__.'/../../public' => public_path('vendor/uccello/uccello'), |
|
| 66 | + __DIR__.'/../../public/images/vendor' => public_path('images/vendor') |
|
| 67 | 67 | ], 'uccello-assets'); |
| 68 | 68 | |
| 69 | 69 | // Config |
| 70 | 70 | $this->publishes([ |
| 71 | - __DIR__ . '/../../config/uccello.php' => config_path('uccello.php'), |
|
| 71 | + __DIR__.'/../../config/uccello.php' => config_path('uccello.php'), |
|
| 72 | 72 | ], 'uccello-config'); |
| 73 | 73 | |
| 74 | 74 | // Views |
| 75 | 75 | $this->publishes([ |
| 76 | - __DIR__ . '/../../resources/views' => resource_path('views/vendor/uccello') |
|
| 76 | + __DIR__.'/../../resources/views' => resource_path('views/vendor/uccello') |
|
| 77 | 77 | ], 'uccello-views'); |
| 78 | 78 | } |
| 79 | 79 | } |
@@ -98,12 +98,12 @@ discard block |
||
| 98 | 98 | { |
| 99 | 99 | // Config |
| 100 | 100 | $this->mergeConfigFrom( |
| 101 | - __DIR__ . '/../../config/uccello.php', |
|
| 101 | + __DIR__.'/../../config/uccello.php', |
|
| 102 | 102 | 'uccello' |
| 103 | 103 | ); |
| 104 | 104 | |
| 105 | 105 | // Helper |
| 106 | - App::bind('uccello', function () { |
|
| 106 | + App::bind('uccello', function() { |
|
| 107 | 107 | return new \Uccello\Core\Helpers\Uccello; |
| 108 | 108 | }); |
| 109 | 109 | |
@@ -83,7 +83,7 @@ |
||
| 83 | 83 | * @param mixed $message |
| 84 | 84 | * @return void |
| 85 | 85 | */ |
| 86 | - function uclog($message, $type='info') |
|
| 86 | + function uclog($message, $type = 'info') |
|
| 87 | 87 | { |
| 88 | 88 | Log::$type($message); |
| 89 | 89 | } |
@@ -126,8 +126,8 @@ |
||
| 126 | 126 | */ |
| 127 | 127 | public function addConditionToSearchQuery(Builder $query, Field $field, $value) : Builder |
| 128 | 128 | { |
| 129 | - $query->where(function ($query) use($field, $value) { |
|
| 130 | - foreach ((array) $value as $_value) { |
|
| 129 | + $query->where(function($query) use($field, $value) { |
|
| 130 | + foreach ((array)$value as $_value) { |
|
| 131 | 131 | $query = $query->orWhere($field->column, '=', $_value); |
| 132 | 132 | } |
| 133 | 133 | }); |
@@ -55,13 +55,13 @@ |
||
| 55 | 55 | public function handle() |
| 56 | 56 | { |
| 57 | 57 | $this->comment('Executing make:auth...'); |
| 58 | - $this->callSilent('make:auth', ['--force' => true]); |
|
| 58 | + $this->callSilent('make:auth', [ '--force' => true ]); |
|
| 59 | 59 | |
| 60 | 60 | $this->comment('Publishing Uccello Assets...'); |
| 61 | - $this->callSilent('vendor:publish', ['--tag' => 'uccello-assets']); |
|
| 61 | + $this->callSilent('vendor:publish', [ '--tag' => 'uccello-assets' ]); |
|
| 62 | 62 | |
| 63 | 63 | $this->comment('Publishing Uccello Configuration...'); |
| 64 | - $this->callSilent('vendor:publish', ['--tag' => 'uccello-config']); |
|
| 64 | + $this->callSilent('vendor:publish', [ '--tag' => 'uccello-config' ]); |
|
| 65 | 65 | |
| 66 | 66 | |
| 67 | 67 | $this->comment('Copying User Model...'); |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | ->get(); |
| 52 | 52 | |
| 53 | 53 | // Order by |
| 54 | - $filterOrderBy = (array) $selectedFilter->order_by; |
|
| 54 | + $filterOrderBy = (array)$selectedFilter->order_by; |
|
| 55 | 55 | |
| 56 | 56 | return $this->autoView(compact('datatableColumns', 'filters', 'selectedFilter', 'filterOrderBy')); |
| 57 | 57 | } |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | if ($relatedList && $relatedList->method) { |
| 145 | 145 | // Related list method |
| 146 | 146 | $method = $relatedList->method; |
| 147 | - $recordIdsMethod = $method . 'RecordIds'; |
|
| 147 | + $recordIdsMethod = $method.'RecordIds'; |
|
| 148 | 148 | |
| 149 | 149 | // Get related records ids |
| 150 | 150 | $model = new $modelClass; |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | |
| 153 | 153 | // Add the record id itself to be filtered |
| 154 | 154 | if ($relatedList->related_module_id === $module->id && !empty($recordId) && !$filteredRecordIds->contains($recordId)) { |
| 155 | - $filteredRecordIds[] = (int)$recordId; |
|
| 155 | + $filteredRecordIds[ ] = (int)$recordId; |
|
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | // Make the quer |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | $records = $query->paginate($length); |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | - $records->getCollection()->transform(function ($record) use ($domain, $module) { |
|
| 166 | + $records->getCollection()->transform(function($record) use ($domain, $module) { |
|
| 167 | 167 | foreach ($module->fields as $field) { |
| 168 | 168 | // If a special template exists, use it. Else use the generic template |
| 169 | 169 | $uitypeViewName = sprintf('uitypes.list.%s', $field->uitype->name); |
@@ -224,9 +224,9 @@ discard block |
||
| 224 | 224 | $savePageLength = $request->input('save_page_length'); |
| 225 | 225 | |
| 226 | 226 | // Optional data |
| 227 | - $data = []; |
|
| 227 | + $data = [ ]; |
|
| 228 | 228 | if ($savePageLength) { |
| 229 | - $data["length"] = $request->input('page_length'); |
|
| 229 | + $data[ "length" ] = $request->input('page_length'); |
|
| 230 | 230 | } |
| 231 | 231 | |
| 232 | 232 | $filter = Filter::firstOrNew([ |
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | $value = $field->uitype->getFormattedValueToDisplay($field, $record); |
| 3 | 3 | $valueParts = explode(';', $value); |
| 4 | -$fileName = $valueParts[0]; |
|
| 4 | +$fileName = $valueParts[ 0 ]; |
|
| 5 | 5 | ?> |
| 6 | 6 | @if (count($valueParts) === 2) |
| 7 | 7 | <a href="{{ ucroute('uccello.download', $domain, $module, [ 'id' => $record->getKey(), 'field' => $field->column ]) }}" |