@@ -31,10 +31,10 @@ discard block |
||
| 31 | 31 | $iso = app()->getLocale(); |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | - $builder->whereExists(function ($query) use ($model, $iso) { |
|
| 34 | + $builder->whereExists(function($query) use ($model, $iso) { |
|
| 35 | 35 | $query->select(\DB::raw(1)) |
| 36 | 36 | ->from($model->getQualifiedTable()) |
| 37 | - ->whereRaw($model->getTable() . '.' . $model->getKeyName() . ' = ' . $model->getQualifiedIdElementColumn()) |
|
| 37 | + ->whereRaw($model->getTable().'.'.$model->getKeyName().' = '.$model->getQualifiedIdElementColumn()) |
|
| 38 | 38 | ->where($model->getQualifiedIsoColumn(), $iso) |
| 39 | 39 | ->where($model->getQualifiedModelColumn(), $model->getTable()); |
| 40 | 40 | }); |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | */ |
| 67 | 67 | protected function addWithoutTranslation(Builder $builder) |
| 68 | 68 | { |
| 69 | - $builder->macro('withoutTranslation', function (Builder $builder) { |
|
| 69 | + $builder->macro('withoutTranslation', function(Builder $builder) { |
|
| 70 | 70 | return $builder->withoutGlobalScope($this); |
| 71 | 71 | }); |
| 72 | 72 | } |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | { |
| 38 | 38 | $translation = new Translation; |
| 39 | 39 | |
| 40 | - return $translation->getTable() . '.' . $translation->getIsoColumn(); |
|
| 40 | + return $translation->getTable().'.'.$translation->getIsoColumn(); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | /** |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | { |
| 50 | 50 | $translation = new Translation; |
| 51 | 51 | |
| 52 | - return $translation->getTable() . '.' . $translation->getIdElementColumn(); |
|
| 52 | + return $translation->getTable().'.'.$translation->getIdElementColumn(); |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | /** |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | { |
| 62 | 62 | $translation = new Translation; |
| 63 | 63 | |
| 64 | - return $translation->getTable() . '.' . $translation->getModelColumn(); |
|
| 64 | + return $translation->getTable().'.'.$translation->getModelColumn(); |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | /** |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | { |
| 74 | 74 | $translation = new Translation; |
| 75 | 75 | |
| 76 | - return $translation->getTable() . '.' . $translation->getIdSourceColumn(); |
|
| 76 | + return $translation->getTable().'.'.$translation->getIdSourceColumn(); |
|
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | /** |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | |
| 78 | 78 | $id_element = $this->model->hasBeenTranslated($this->model->getTable(), $id, $iso); |
| 79 | 79 | if (!empty($id_element)) { |
| 80 | - return redirect()->to(action($this->getControllerNameForAction() . '@getEdit', $id_element)); |
|
| 80 | + return redirect()->to(action($this->getControllerNameForAction().'@getEdit', $id_element)); |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | $model = (!empty($id)) ? $this->model->withoutTranslation()->findOrFail($id) : $this->model; |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | return $result; |
| 134 | 134 | } |
| 135 | 135 | |
| 136 | - return redirect()->to(action($this->getControllerNameForAction() . '@getIndex')); |
|
| 136 | + return redirect()->to(action($this->getControllerNameForAction().'@getIndex')); |
|
| 137 | 137 | } |
| 138 | 138 | |
| 139 | 139 | // ------------------------------------------------------------------------------------------------ |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | return $result; |
| 168 | 168 | } |
| 169 | 169 | |
| 170 | - return redirect()->to(action($this->getControllerNameForAction() . '@getIndex')); |
|
| 170 | + return redirect()->to(action($this->getControllerNameForAction().'@getIndex')); |
|
| 171 | 171 | |
| 172 | 172 | } |
| 173 | 173 | |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | $form_content = view('form-builder::form.components.formgenerator.info', [ |
| 231 | 231 | 'form' => $form, |
| 232 | 232 | 'id' => $id, |
| 233 | - 'route' => $this->getControllerNameForAction() . '@', |
|
| 233 | + 'route' => $this->getControllerNameForAction().'@', |
|
| 234 | 234 | ]); |
| 235 | 235 | |
| 236 | 236 | $this->layoutManager->add([ |
@@ -250,6 +250,6 @@ discard block |
||
| 250 | 250 | |
| 251 | 251 | $action = explode('@', \Route::currentRouteAction()); |
| 252 | 252 | |
| 253 | - return '\\' . $action[0]; |
|
| 253 | + return '\\'.$action[0]; |
|
| 254 | 254 | } |
| 255 | 255 | } |
| 256 | 256 | \ No newline at end of file |
@@ -59,12 +59,12 @@ |
||
| 59 | 59 | if (!$result->isEmpty()) |
| 60 | 60 | { |
| 61 | 61 | $exporter = app($data['type']); |
| 62 | - $file = $exporter->export($result->toArray(), $data['range']['start'] . ' ' . $data['range']['end']); |
|
| 62 | + $file = $exporter->export($result->toArray(), $data['range']['start'].' '.$data['range']['end']); |
|
| 63 | 63 | |
| 64 | 64 | return $file; |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | - return redirect()->to(action('\\' . get_class($this) . '@getExport')); |
|
| 67 | + return redirect()->to(action('\\'.get_class($this).'@getExport')); |
|
| 68 | 68 | |
| 69 | 69 | } |
| 70 | 70 | } |
| 71 | 71 | \ No newline at end of file |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | return redirect()->back()->with(Message::WARNING, [trans('expendable::errors.file_not_found')]); |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | - $contract = ucfirst(app('files')->extension($file)) . 'ImporterContract'; |
|
| 60 | + $contract = ucfirst(app('files')->extension($file)).'ImporterContract'; |
|
| 61 | 61 | $exporter = app($contract); |
| 62 | 62 | $data = $exporter->getArrayDataFromFile($file); |
| 63 | 63 | |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | { |
| 58 | 58 | return $this->view->make($template, [ |
| 59 | 59 | 'states' => $this->getTableState(), |
| 60 | - 'action' => '\\' . $this->class . '@' |
|
| 60 | + 'action' => '\\'.$this->class.'@' |
|
| 61 | 61 | ]); |
| 62 | 62 | } |
| 63 | 63 | |
@@ -28,18 +28,18 @@ discard block |
||
| 28 | 28 | */ |
| 29 | 29 | public function boot() |
| 30 | 30 | { |
| 31 | - $this->loadViewsFrom(__DIR__ . '/../../views', 'expendable'); |
|
| 32 | - $this->loadTranslationsFrom(__DIR__ . '/../../lang', 'expendable'); |
|
| 31 | + $this->loadViewsFrom(__DIR__.'/../../views', 'expendable'); |
|
| 32 | + $this->loadTranslationsFrom(__DIR__.'/../../lang', 'expendable'); |
|
| 33 | 33 | $this->publishes([ |
| 34 | - __DIR__ . '/../../config/config.php' => config_path('expendable.php'), |
|
| 35 | - __DIR__ . '/../../database/migrations/' => base_path('/database/migrations'), |
|
| 36 | - __DIR__ . '/../../database/seeds/' => base_path('/database/seeds'), |
|
| 34 | + __DIR__.'/../../config/config.php' => config_path('expendable.php'), |
|
| 35 | + __DIR__.'/../../database/migrations/' => base_path('/database/migrations'), |
|
| 36 | + __DIR__.'/../../database/seeds/' => base_path('/database/seeds'), |
|
| 37 | 37 | ]); |
| 38 | 38 | $this->publishes([ |
| 39 | - __DIR__ . '/../../views' => base_path('resources/views/vendor/expendable'), |
|
| 39 | + __DIR__.'/../../views' => base_path('resources/views/vendor/expendable'), |
|
| 40 | 40 | ], 'views'); |
| 41 | 41 | $this->mergeConfigFrom( |
| 42 | - __DIR__ . '/../../config/config.php', 'expendable' |
|
| 42 | + __DIR__.'/../../config/config.php', 'expendable' |
|
| 43 | 43 | ); |
| 44 | 44 | |
| 45 | 45 | $autoLoaderListener = new \Distilleries\Expendable\Register\ListenerAutoLoader(config('expendable.listener')); |
@@ -120,13 +120,13 @@ discard block |
||
| 120 | 120 | protected function registerCommands() |
| 121 | 121 | { |
| 122 | 122 | $file = app('files'); |
| 123 | - $files = $file->allFiles(__DIR__ . '/Console/'); |
|
| 123 | + $files = $file->allFiles(__DIR__.'/Console/'); |
|
| 124 | 124 | |
| 125 | 125 | foreach ($files as $file) |
| 126 | 126 | { |
| 127 | 127 | if (strpos($file->getPathName(), 'Lib') === false) |
| 128 | 128 | { |
| 129 | - $this->commands('Distilleries\Expendable\Console\\' . preg_replace('/\.php/i', '', $file->getFilename())); |
|
| 129 | + $this->commands('Distilleries\Expendable\Console\\'.preg_replace('/\.php/i', '', $file->getFilename())); |
|
| 130 | 130 | } |
| 131 | 131 | } |
| 132 | 132 | } |
@@ -2,8 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | use Distilleries\Expendable\Exporter\CsvExporter; |
| 4 | 4 | use Distilleries\Expendable\Exporter\ExcelExporter; |
| 5 | -use Distilleries\Expendable\Exporter\PdfExporter; |
|
| 6 | -use Distilleries\Expendable\Http\Router\Router; |
|
| 7 | 5 | use Distilleries\Expendable\Importer\CsvImporter; |
| 8 | 6 | use Distilleries\Expendable\Importer\XlsImporter; |
| 9 | 7 | use Distilleries\Expendable\Layouts\LayoutManager; |
@@ -46,11 +46,11 @@ discard block |
||
| 46 | 46 | { |
| 47 | 47 | $allModels = [ |
| 48 | 48 | [ |
| 49 | - 'path' => app_path() . DIRECTORY_SEPARATOR, |
|
| 49 | + 'path' => app_path().DIRECTORY_SEPARATOR, |
|
| 50 | 50 | 'namespace' => '{{app}}', |
| 51 | 51 | ], |
| 52 | 52 | [ |
| 53 | - 'path' => __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'Models' . DIRECTORY_SEPARATOR, |
|
| 53 | + 'path' => __DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'Models'.DIRECTORY_SEPARATOR, |
|
| 54 | 54 | 'namespace' => 'Distilleries\\Expendable\\Models\\', |
| 55 | 55 | ], |
| 56 | 56 | ]; |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | { |
| 64 | 64 | $choice = explode('/', $model); |
| 65 | 65 | $model = preg_replace('/.php/i', '', last($choice)); |
| 66 | - $choices[$config['namespace'] . $model] = $model; |
|
| 66 | + $choices[$config['namespace'].$model] = $model; |
|
| 67 | 67 | } |
| 68 | 68 | } |
| 69 | 69 | |
@@ -77,7 +77,7 @@ |
||
| 77 | 77 | protected function getUpdateRules() |
| 78 | 78 | { |
| 79 | 79 | $key = \Request::get($this->model->getKeyName()); |
| 80 | - static::$rules_update['email'] = 'required|email|unique:users,email,' . $key; |
|
| 80 | + static::$rules_update['email'] = 'required|email|unique:users,email,'.$key; |
|
| 81 | 81 | |
| 82 | 82 | return parent::getUpdateRules(); |
| 83 | 83 | } |