@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php namespace Distilleries\Expendable\Datatables; |
2 | 2 | |
3 | -use Distilleries\DatatableBuilder\EloquentDatatable; |
|
4 | -use Distilleries\Expendable\Models\Language; |
|
3 | +use Distilleries\DatatableBuilder\EloquentDatatable; |
|
4 | +use Distilleries\Expendable\Models\Language; |
|
5 | 5 | use Distilleries\Expendable\Models\Translation; |
6 | 6 | |
7 | 7 | abstract class BaseDatatable extends EloquentDatatable { |
@@ -10,15 +10,15 @@ |
||
10 | 10 | // ------------------------------------------------------------------------------------------------ |
11 | 11 | public function addTranslationAction($template = 'expendable::admin.form.components.datatable.translations', $route = '') |
12 | 12 | { |
13 | - $this->add('translation', function ($model) use ($template, $route) { |
|
13 | + $this->add('translation', function($model) use ($template, $route) { |
|
14 | 14 | |
15 | 15 | $languages = Language::withoutCurrentLanguage()->get(); |
16 | - $translations = Translation::byElement($model)->pluck('id_element','iso')->toArray(); |
|
16 | + $translations = Translation::byElement($model)->pluck('id_element', 'iso')->toArray(); |
|
17 | 17 | return view($template, array( |
18 | 18 | 'languages' => $languages, |
19 | 19 | 'translations' => $translations, |
20 | 20 | 'data' => $model->toArray(), |
21 | - 'route' => !empty($route) ? $route . '@' : $this->getControllerNameForAction() . '@' |
|
21 | + 'route' => !empty($route) ? $route.'@' : $this->getControllerNameForAction().'@' |
|
22 | 22 | ))->render(); |
23 | 23 | }); |
24 | 24 |
@@ -2,7 +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 | 5 | use Distilleries\Expendable\Importer\CsvImporter; |
7 | 6 | use Distilleries\Expendable\Importer\XlsImporter; |
8 | 7 | use Distilleries\Expendable\Layouts\LayoutManager; |
@@ -30,22 +30,22 @@ discard block |
||
30 | 30 | public function boot() |
31 | 31 | { |
32 | 32 | |
33 | - $this->loadViewsFrom(__DIR__ . '/../../views', 'expendable'); |
|
34 | - $this->loadTranslationsFrom(__DIR__ . '/../../lang', 'expendable'); |
|
35 | - $this->loadMigrationsFrom(__DIR__ . '/../../database/migrations/'); |
|
33 | + $this->loadViewsFrom(__DIR__.'/../../views', 'expendable'); |
|
34 | + $this->loadTranslationsFrom(__DIR__.'/../../lang', 'expendable'); |
|
35 | + $this->loadMigrationsFrom(__DIR__.'/../../database/migrations/'); |
|
36 | 36 | |
37 | 37 | |
38 | 38 | $this->publishes([ |
39 | - __DIR__ . '/../../config/config.php' => config_path('expendable.php'), |
|
40 | - __DIR__ . '/../../database/seeds/' => base_path('/database/seeds'), |
|
39 | + __DIR__.'/../../config/config.php' => config_path('expendable.php'), |
|
40 | + __DIR__.'/../../database/seeds/' => base_path('/database/seeds'), |
|
41 | 41 | ]); |
42 | 42 | |
43 | 43 | |
44 | 44 | $this->publishes([ |
45 | - __DIR__ . '/../../views' => base_path('resources/views/vendor/expendable'), |
|
45 | + __DIR__.'/../../views' => base_path('resources/views/vendor/expendable'), |
|
46 | 46 | ], 'views'); |
47 | 47 | $this->mergeConfigFrom( |
48 | - __DIR__ . '/../../config/config.php', 'expendable' |
|
48 | + __DIR__.'/../../config/config.php', 'expendable' |
|
49 | 49 | ); |
50 | 50 | |
51 | 51 | $autoLoaderListener = new \Distilleries\Expendable\Register\ListenerAutoLoader(config('expendable.listener')); |
@@ -128,13 +128,13 @@ discard block |
||
128 | 128 | protected function registerCommands() |
129 | 129 | { |
130 | 130 | $file = app('files'); |
131 | - $files = $file->allFiles(__DIR__ . '/Console/'); |
|
131 | + $files = $file->allFiles(__DIR__.'/Console/'); |
|
132 | 132 | |
133 | 133 | foreach ($files as $file) |
134 | 134 | { |
135 | 135 | if (strpos($file->getPathName(), 'Lib') === false) |
136 | 136 | { |
137 | - $this->commands('Distilleries\Expendable\Console\\' . preg_replace('/\.php/i', '', $file->getFilename())); |
|
137 | + $this->commands('Distilleries\Expendable\Console\\'.preg_replace('/\.php/i', '', $file->getFilename())); |
|
138 | 138 | } |
139 | 139 | } |
140 | 140 | } |
@@ -2,7 +2,6 @@ |
||
2 | 2 | |
3 | 3 | use Distilleries\Expendable\Contracts\LockableContract; |
4 | 4 | use Distilleries\Expendable\Helpers\UserUtils; |
5 | -use Distilleries\Expendable\Models\User; |
|
6 | 5 | |
7 | 6 | class UserListener extends BaseListener |
8 | 7 | { |
@@ -35,7 +35,7 @@ |
||
35 | 35 | { |
36 | 36 | |
37 | 37 | |
38 | - if($model->email != ''){ |
|
38 | + if ($model->email != '') { |
|
39 | 39 | $model->unlock(); |
40 | 40 | } |
41 | 41 |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | } |
54 | 54 | |
55 | 55 | |
56 | - public function postUnLock(Request $request){ |
|
56 | + public function postUnLock(Request $request) { |
|
57 | 57 | |
58 | 58 | $model = $this->model->findOrFail($request->get('id')); |
59 | 59 | $model->nb_of_try = 0; |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | } |
64 | 64 | |
65 | 65 | |
66 | - public function postLock(Request $request){ |
|
66 | + public function postLock(Request $request) { |
|
67 | 67 | |
68 | 68 | $model = $this->model->findOrFail($request->get('id')); |
69 | 69 | $model->nb_of_try = config('expendable.auth.nb_of_try'); |
@@ -5,7 +5,7 @@ |
||
5 | 5 | use Illuminate\Database\Eloquent\Scope; |
6 | 6 | use Illuminate\Database\Eloquent\Model; |
7 | 7 | |
8 | -class StatusScope implements Scope{ |
|
8 | +class StatusScope implements Scope { |
|
9 | 9 | |
10 | 10 | /** |
11 | 11 | * All of the extensions to be added to the builder. |
@@ -49,7 +49,7 @@ |
||
49 | 49 | $this->layoutManager->initStaticPart(function($layoutManager) |
50 | 50 | { |
51 | 51 | |
52 | - $menu_top = $layoutManager->getView()->make('expendable::admin.menu.top',[ |
|
52 | + $menu_top = $layoutManager->getView()->make('expendable::admin.menu.top', [ |
|
53 | 53 | 'languages'=>Language::all() |
54 | 54 | ]); |
55 | 55 | $menu_left = $layoutManager->getView()->make('expendable::admin.menu.left'); |
@@ -4,7 +4,7 @@ |
||
4 | 4 | 'login_uri' => 'admin/login', |
5 | 5 | 'logout_action' => 'Distilleries\Expendable\Http\Controllers\Admin\LoginController@getLogout', |
6 | 6 | 'admin_base_uri' => 'admin', |
7 | - 'config_file_assets' => base_path() . '/package.json', |
|
7 | + 'config_file_assets' => base_path().'/package.json', |
|
8 | 8 | 'folder_whitelist' => [ |
9 | 9 | 'moximanager' |
10 | 10 | ], |
@@ -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 | /** |