@@ -58,8 +58,8 @@ |
||
| 58 | 58 | AdminColumn::text('roles.name', 'Права') |
| 59 | 59 | ->setWidth('150px') |
| 60 | 60 | ->setOrderable(false) |
| 61 | - ->setSearchCallback(function ($column, $query, $search) { |
|
| 62 | - return $query->orWhereHas('roles', function ($q) use ($search) { |
|
| 61 | + ->setSearchCallback(function($column, $query, $search) { |
|
| 62 | + return $query->orWhereHas('roles', function($q) use ($search) { |
|
| 63 | 63 | $q->where('name', 'like', '%'.$search.'%'); |
| 64 | 64 | }); |
| 65 | 65 | }), |
@@ -1,12 +1,12 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -Route::get('', ['as' => 'admin.dashboard', function () { |
|
| 3 | +Route::get('', ['as' => 'admin.dashboard', function() { |
|
| 4 | 4 | $content = 'Тут информация'; |
| 5 | 5 | |
| 6 | 6 | return AdminSection::view($content, 'Панель'); |
| 7 | 7 | }]); |
| 8 | 8 | |
| 9 | -Route::namespace('App\Http\Controllers')->group(function () { |
|
| 9 | +Route::namespace('App\Http\Controllers')->group(function() { |
|
| 10 | 10 | // Route::post('service/exel', 'AdminServiceController@exportExel')->name('export_exel'); |
| 11 | 11 | Route::get('service/clearcache', 'AdminController@clearCache')->name('clear_cache'); |
| 12 | 12 | }); |
@@ -36,14 +36,14 @@ |
||
| 36 | 36 | { |
| 37 | 37 | parent::boot(); |
| 38 | 38 | |
| 39 | - self::creating(function ($model) { |
|
| 39 | + self::creating(function($model) { |
|
| 40 | 40 | if (Auth()->check()) { |
| 41 | 41 | $model->created_by = Auth()->user()->id; |
| 42 | 42 | $model->modifed_by = Auth()->user()->id; |
| 43 | 43 | } |
| 44 | 44 | }); |
| 45 | 45 | |
| 46 | - self::updating(function ($model) { |
|
| 46 | + self::updating(function($model) { |
|
| 47 | 47 | if (Auth()->check()) { |
| 48 | 48 | $model->modifed_by = Auth()->user()->id; |
| 49 | 49 | } |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | Script::observe(ScriptObserver::class); |
| 36 | 36 | Setting::observe(SettingObserver::class); |
| 37 | 37 | |
| 38 | - Gate::define('admin-only', function ($user) { |
|
| 38 | + Gate::define('admin-only', function($user) { |
|
| 39 | 39 | if ($user->isAdmin() || $user->isModerator()) { |
| 40 | 40 | return true; |
| 41 | 41 | } |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | if (Cache::has('t_'.$this->apiKey)) { |
| 31 | 31 | $check = Cache::get('t_'.$this->apiKey); |
| 32 | 32 | } else { |
| 33 | - $check = Cache::remember('t_'.$this->apiKey, $cache_time_forever, function () { |
|
| 33 | + $check = Cache::remember('t_'.$this->apiKey, $cache_time_forever, function() { |
|
| 34 | 34 | $m1token = Token::where('api_token', $this->apiKey)->first(); |
| 35 | 35 | |
| 36 | 36 | return $m1token; |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | ->select($columns) |
| 30 | 30 | ->get(); |
| 31 | 31 | |
| 32 | - $setting = $result->mapWithKeys(function ($item) { |
|
| 32 | + $setting = $result->mapWithKeys(function($item) { |
|
| 33 | 33 | return [$item['name'] => $item['value']]; |
| 34 | 34 | }); |
| 35 | 35 | |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | if (Cache::has($cache_name) && !Cache::get($cache_name)->isEmpty()) { |
| 45 | 45 | $data_cache = Cache::get($cache_name); |
| 46 | 46 | } else { |
| 47 | - $data_cache = Cache::remember($cache_name, $this->cache_time_forever, function () { |
|
| 47 | + $data_cache = Cache::remember($cache_name, $this->cache_time_forever, function() { |
|
| 48 | 48 | return $this->getSetting(); |
| 49 | 49 | }); |
| 50 | 50 | } |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | if (Cache::has($cache_name) && !empty(Cache::get($cache_name))) { |
| 57 | 57 | $data_cache = Cache::get($cache_name); |
| 58 | 58 | } else { |
| 59 | - $data_cache = Cache::remember($cache_name, $this->cache_time_forever, function () use ($lang) { |
|
| 59 | + $data_cache = Cache::remember($cache_name, $this->cache_time_forever, function() use ($lang) { |
|
| 60 | 60 | return $this->getLng($lang); |
| 61 | 61 | }); |
| 62 | 62 | } |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | if (Cache::has($cache_name) && !Cache::get($cache_name)->isEmpty()) { |
| 45 | 45 | $data_cache = Cache::get($cache_name); |
| 46 | 46 | } else { |
| 47 | - $data_cache = Cache::remember($cache_name, $this->cache_time_forever, function () { |
|
| 47 | + $data_cache = Cache::remember($cache_name, $this->cache_time_forever, function() { |
|
| 48 | 48 | return $this->getScripts(); |
| 49 | 49 | }); |
| 50 | 50 | } |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | // cache()->forget('check'); |
| 19 | 19 | |
| 20 | 20 | if (!Cache::has('check')) { |
| 21 | - Cache::remember('check', $time, function () use ($error) { |
|
| 21 | + Cache::remember('check', $time, function() use ($error) { |
|
| 22 | 22 | try { |
| 23 | 23 | DB::connection()->table(DB::raw('settings'))->first([DB::raw(1)]); |
| 24 | 24 | if (!DB::connection()->table(DB::raw('settings'))->count()) { |