@@ -31,7 +31,7 @@ |
||
31 | 31 | Providers\ViewServiceProvider::class, |
32 | 32 | ]); |
33 | 33 | |
34 | - $this->app->booting(function (Application $app) { |
|
34 | + $this->app->booting(function(Application $app) { |
|
35 | 35 | /** @var \Illuminate\Contracts\Config\Repository $config */ |
36 | 36 | $config = $app['config']; |
37 | 37 |
@@ -28,11 +28,11 @@ |
||
28 | 28 | $this->prefix('abilities')->name('abilities.')->group(function () { |
29 | 29 | // admin::system.abilities.index |
30 | 30 | $this->get('/', [AbilitiesController::class, 'index']) |
31 | - ->name('index'); |
|
31 | + ->name('index'); |
|
32 | 32 | |
33 | 33 | // admin::system.abilities.show |
34 | 34 | $this->get('{admin_ability_key}', [AbilitiesController::class, 'show']) |
35 | - ->name('show'); |
|
35 | + ->name('show'); |
|
36 | 36 | }); |
37 | 37 | }); |
38 | 38 | } |
@@ -24,8 +24,8 @@ |
||
24 | 24 | */ |
25 | 25 | public function map(): void |
26 | 26 | { |
27 | - $this->adminGroup(function () { |
|
28 | - $this->prefix('abilities')->name('abilities.')->group(function () { |
|
27 | + $this->adminGroup(function() { |
|
28 | + $this->prefix('abilities')->name('abilities.')->group(function() { |
|
29 | 29 | // admin::system.abilities.index |
30 | 30 | $this->get('/', [AbilitiesController::class, 'index']) |
31 | 31 | ->name('index'); |
@@ -27,7 +27,7 @@ |
||
27 | 27 | $this->adminGroup(function () { |
28 | 28 | // admin::system.index |
29 | 29 | $this->get('/', [SystemController::class, 'index']) |
30 | - ->name('index'); |
|
30 | + ->name('index'); |
|
31 | 31 | }); |
32 | 32 | } |
33 | 33 | } |
34 | 34 | \ No newline at end of file |
@@ -24,7 +24,7 @@ |
||
24 | 24 | */ |
25 | 25 | public function map(): void |
26 | 26 | { |
27 | - $this->adminGroup(function () { |
|
27 | + $this->adminGroup(function() { |
|
28 | 28 | // admin::system.index |
29 | 29 | $this->get('/', [SystemController::class, 'index']) |
30 | 30 | ->name('index'); |
@@ -28,35 +28,35 @@ |
||
28 | 28 | $this->prefix('log-viewer')->name('log-viewer.')->group(function () { |
29 | 29 | // admin::system.log-viewer.index |
30 | 30 | $this->get('/', [LogViewerController::class, 'index']) |
31 | - ->name('index'); |
|
31 | + ->name('index'); |
|
32 | 32 | |
33 | 33 | $this->prefix('logs')->name('logs.')->group(function () { |
34 | 34 | // admin::system.log-viewer.logs.index |
35 | 35 | $this->get('/', [LogViewerController::class, 'logs']) |
36 | - ->name('index'); |
|
36 | + ->name('index'); |
|
37 | 37 | |
38 | 38 | $this->prefix('{admin_log_file_date}')->group(function () { |
39 | 39 | // admin::system.log-viewer.logs.show |
40 | 40 | $this->get('/', [LogViewerController::class, 'showLog']) |
41 | - ->name('show'); |
|
41 | + ->name('show'); |
|
42 | 42 | |
43 | 43 | // admin::system.log-viewer.logs.download |
44 | 44 | $this->get('download', [LogViewerController::class, 'download']) |
45 | - ->name('download'); |
|
45 | + ->name('download'); |
|
46 | 46 | |
47 | 47 | // admin::system.log-viewer.logs.delete |
48 | 48 | $this->delete('delete', [LogViewerController::class, 'delete']) |
49 | - ->middleware(['ajax']) |
|
50 | - ->name('delete'); |
|
49 | + ->middleware(['ajax']) |
|
50 | + ->name('delete'); |
|
51 | 51 | |
52 | 52 | $this->prefix('{admin_log_level}')->group(function () { |
53 | 53 | // admin::system.log-viewer.logs.filter |
54 | 54 | $this->get('/', [LogViewerController::class, 'filter']) |
55 | - ->name('filter'); |
|
55 | + ->name('filter'); |
|
56 | 56 | |
57 | 57 | // admin::system.log-viewer.logs.search |
58 | 58 | $this->get('search', [LogViewerController::class, 'search']) |
59 | - ->name('search'); |
|
59 | + ->name('search'); |
|
60 | 60 | }); |
61 | 61 | }); |
62 | 62 | }); |
@@ -24,18 +24,18 @@ discard block |
||
24 | 24 | */ |
25 | 25 | public function map(): void |
26 | 26 | { |
27 | - $this->adminGroup(function () { |
|
28 | - $this->prefix('log-viewer')->name('log-viewer.')->group(function () { |
|
27 | + $this->adminGroup(function() { |
|
28 | + $this->prefix('log-viewer')->name('log-viewer.')->group(function() { |
|
29 | 29 | // admin::system.log-viewer.index |
30 | 30 | $this->get('/', [LogViewerController::class, 'index']) |
31 | 31 | ->name('index'); |
32 | 32 | |
33 | - $this->prefix('logs')->name('logs.')->group(function () { |
|
33 | + $this->prefix('logs')->name('logs.')->group(function() { |
|
34 | 34 | // admin::system.log-viewer.logs.index |
35 | 35 | $this->get('/', [LogViewerController::class, 'logs']) |
36 | 36 | ->name('index'); |
37 | 37 | |
38 | - $this->prefix('{admin_log_file_date}')->group(function () { |
|
38 | + $this->prefix('{admin_log_file_date}')->group(function() { |
|
39 | 39 | // admin::system.log-viewer.logs.show |
40 | 40 | $this->get('/', [LogViewerController::class, 'showLog']) |
41 | 41 | ->name('show'); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | ->middleware(['ajax']) |
50 | 50 | ->name('delete'); |
51 | 51 | |
52 | - $this->prefix('{admin_log_level}')->group(function () { |
|
52 | + $this->prefix('{admin_log_level}')->group(function() { |
|
53 | 53 | // admin::system.log-viewer.logs.filter |
54 | 54 | $this->get('/', [LogViewerController::class, 'filter']) |
55 | 55 | ->name('filter'); |
@@ -28,7 +28,7 @@ |
||
28 | 28 | $this->prefix('routes-viewer')->name('routes-viewer.')->group(function () { |
29 | 29 | // admin::system.routes-viewer.index |
30 | 30 | $this->get('/', [RoutesViewerController::class, 'index']) |
31 | - ->name('index'); |
|
31 | + ->name('index'); |
|
32 | 32 | }); |
33 | 33 | }); |
34 | 34 | } |
@@ -24,8 +24,8 @@ |
||
24 | 24 | */ |
25 | 25 | public function map(): void |
26 | 26 | { |
27 | - $this->adminGroup(function () { |
|
28 | - $this->prefix('routes-viewer')->name('routes-viewer.')->group(function () { |
|
27 | + $this->adminGroup(function() { |
|
28 | + $this->prefix('routes-viewer')->name('routes-viewer.')->group(function() { |
|
29 | 29 | // admin::system.routes-viewer.index |
30 | 30 | $this->get('/', [RoutesViewerController::class, 'index']) |
31 | 31 | ->name('index'); |
@@ -28,15 +28,15 @@ |
||
28 | 28 | $this->prefix('maintenance')->name('maintenance.')->group(function () { |
29 | 29 | // admin::system.maintenance.index |
30 | 30 | $this->get('/', [MaintenanceController::class, 'index']) |
31 | - ->name('index'); |
|
31 | + ->name('index'); |
|
32 | 32 | |
33 | 33 | // admin::system.maintenance.start |
34 | 34 | $this->post('start', [MaintenanceController::class, 'start']) |
35 | - ->name('start'); |
|
35 | + ->name('start'); |
|
36 | 36 | |
37 | 37 | // admin::system.maintenance.stop |
38 | 38 | $this->post('stop', [MaintenanceController::class, 'stop']) |
39 | - ->name('stop'); |
|
39 | + ->name('stop'); |
|
40 | 40 | }); |
41 | 41 | }); |
42 | 42 | } |
@@ -24,8 +24,8 @@ |
||
24 | 24 | */ |
25 | 25 | public function map(): void |
26 | 26 | { |
27 | - $this->adminGroup(function () { |
|
28 | - $this->prefix('maintenance')->name('maintenance.')->group(function () { |
|
27 | + $this->adminGroup(function() { |
|
28 | + $this->prefix('maintenance')->name('maintenance.')->group(function() { |
|
29 | 29 | // admin::system.maintenance.index |
30 | 30 | $this->get('/', [MaintenanceController::class, 'index']) |
31 | 31 | ->name('index'); |
@@ -28,7 +28,7 @@ |
||
28 | 28 | protected function moduleGroup(Closure $callback) |
29 | 29 | { |
30 | 30 | $this->prefix('system') |
31 | - ->name('system.') |
|
32 | - ->group($callback); |
|
31 | + ->name('system.') |
|
32 | + ->group($callback); |
|
33 | 33 | } |
34 | 34 | } |
35 | 35 | \ No newline at end of file |
@@ -103,8 +103,8 @@ |
||
103 | 103 | $log = $this->getLogOrFail($date); |
104 | 104 | $levels = $this->logViewer->levelsNames(); |
105 | 105 | $entries = $log->entries($level) |
106 | - ->unless(is_null($query = $request->get('query')), function (LogEntryCollection $entries) use ($query) { |
|
107 | - return $entries->filter(function (LogEntry $value) use ($query) { |
|
106 | + ->unless(is_null($query = $request->get('query')), function(LogEntryCollection $entries) use ($query) { |
|
107 | + return $entries->filter(function(LogEntry $value) use ($query) { |
|
108 | 108 | return Str::contains($value->header, $query); |
109 | 109 | }); |
110 | 110 | }) |
@@ -124,8 +124,9 @@ discard block |
||
124 | 124 | { |
125 | 125 | $this->authorize(LogViewerPolicy::ability('delete')); |
126 | 126 | |
127 | - if ( ! $this->logViewer->delete($date)) |
|
128 | - return $this->jsonResponseError(); |
|
127 | + if ( ! $this->logViewer->delete($date)) { |
|
128 | + return $this->jsonResponseError(); |
|
129 | + } |
|
129 | 130 | |
130 | 131 | $this->notifySuccess(__('Log Deleted'), __('The log file has been successfully deleted!')); |
131 | 132 | |
@@ -220,8 +221,7 @@ discard block |
||
220 | 221 | |
221 | 222 | try { |
222 | 223 | $log = $this->logViewer->get($date); |
223 | - } |
|
224 | - catch (LogNotFoundException $e) { |
|
224 | + } catch (LogNotFoundException $e) { |
|
225 | 225 | abort(404, $e->getMessage()); |
226 | 226 | } |
227 | 227 |
@@ -78,7 +78,7 @@ |
||
78 | 78 | */ |
79 | 79 | protected function getAbilities() |
80 | 80 | { |
81 | - return $this->manager->abilities()->map(function (Ability $ability) { |
|
81 | + return $this->manager->abilities()->map(function(Ability $ability) { |
|
82 | 82 | return $ability->setMeta('is_registered', Gate::has($ability->key())); |
83 | 83 | }); |
84 | 84 | } |