@@ -10,10 +10,10 @@ |
||
| 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)->lists('id_element','iso')->toArray();
|
|
| 16 | + $translations = Translation::byElement($model)->lists('id_element', 'iso')->toArray();
|
|
| 17 | 17 | return view($template, array( |
| 18 | 18 | 'languages' => $languages, |
| 19 | 19 | 'translations' => $translations, |
@@ -14,11 +14,11 @@ |
||
| 14 | 14 | |
| 15 | 15 | public function scopeWithoutCurrentLanguage($query) |
| 16 | 16 | {
|
| 17 | - return $query->where($this->getTable().'.iso','<>',app()->getLocale()); |
|
| 17 | + return $query->where($this->getTable() . '.iso', '<>', app()->getLocale()); |
|
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | public function scopeWithTranslationElement($query) |
| 21 | 21 | {
|
| 22 | - return $query->where($this->getTable().'.iso','<>',app()->getLocale()); |
|
| 22 | + return $query->where($this->getTable() . '.iso', '<>', app()->getLocale()); |
|
| 23 | 23 | } |
| 24 | 24 | } |
| 25 | 25 | \ No newline at end of file |
@@ -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. |
@@ -31,7 +31,7 @@ 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 | 37 | ->whereRaw($model->getTable() . '.' . $model->getKeyName() . ' = ' . $model->getQualifiedIdElementColumn()) |
@@ -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 | } |
@@ -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'); |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | { |
| 29 | 29 | parent::__construct($layoutManager); |
| 30 | 30 | |
| 31 | - $this->auth = $auth; |
|
| 31 | + $this->auth = $auth; |
|
| 32 | 32 | |
| 33 | 33 | } |
| 34 | 34 | |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | |
| 212 | 212 | $broker = $this->getBroker(); |
| 213 | 213 | |
| 214 | - $response = \Password::broker($broker)->reset($credentials, function ($user, $password) { |
|
| 214 | + $response = \Password::broker($broker)->reset($credentials, function($user, $password) { |
|
| 215 | 215 | $user->password = bcrypt($password); |
| 216 | 216 | $user->save(); |
| 217 | 217 | |
@@ -519,13 +519,13 @@ |
||
| 519 | 519 | public function scopeSearch($query, $searchQuery) |
| 520 | 520 | { |
| 521 | 521 | |
| 522 | - return $query->where(function ($query) use ($searchQuery) |
|
| 522 | + return $query->where(function($query) use ($searchQuery) |
|
| 523 | 523 | { |
| 524 | 524 | $columns = $this->getAllColumnsNames(); |
| 525 | 525 | |
| 526 | 526 | foreach ($columns as $column) |
| 527 | 527 | { |
| 528 | - $column = $this->isReserved($column)?'"'.$column.'"':$column; |
|
| 528 | + $column = $this->isReserved($column) ? '"' . $column . '"' : $column; |
|
| 529 | 529 | $query->orWhereRaw('LOWER(' . $column . ') like ?', ['%' . strtolower($searchQuery) . '%']); |
| 530 | 530 | } |
| 531 | 531 | }); |