@@ -19,7 +19,7 @@ |
||
| 19 | 19 | $output[] = '<i class="'.$item->icon().'"></i> <span>'.$item->title().'</span> <i class="fa fa-angle-left pull-right"></i>'; |
| 20 | 20 | $output[] = '</a>'; |
| 21 | 21 | $output[] = '<ul class="treeview-menu">'; |
| 22 | - $output[] = $item->children()->transform(function ($child) { return renderSidebarItem($child); })->implode(PHP_EOL); |
|
| 22 | + $output[] = $item->children()->transform(function($child) { return renderSidebarItem($child); })->implode(PHP_EOL); |
|
| 23 | 23 | $output[] = '</ul>'; |
| 24 | 24 | } |
| 25 | 25 | else { |
@@ -21,8 +21,7 @@ |
||
| 21 | 21 | $output[] = '<ul class="treeview-menu">'; |
| 22 | 22 | $output[] = $item->children()->transform(function ($child) { return renderSidebarItem($child); })->implode(PHP_EOL); |
| 23 | 23 | $output[] = '</ul>'; |
| 24 | - } |
|
| 25 | - else { |
|
| 24 | + } else { |
|
| 26 | 25 | $output[] = '<a href="'.$item->url().'">'; |
| 27 | 26 | $output[] = '<i class="'.$item->icon().'"></i> <span>'.$item->title().'</span>'; |
| 28 | 27 | $output[] = '</a>'; |
@@ -95,7 +95,8 @@ |
||
| 95 | 95 | { |
| 96 | 96 | $providers = $this->config()->get('arcanesoft.foundation.modules.providers', []); |
| 97 | 97 | |
| 98 | - if (count($providers) > 0) |
|
| 99 | - $this->registerProviders($providers); |
|
| 98 | + if (count($providers) > 0) { |
|
| 99 | + $this->registerProviders($providers); |
|
| 100 | + } |
|
| 100 | 101 | } |
| 101 | 102 | } |
@@ -49,8 +49,8 @@ |
||
| 49 | 49 | */ |
| 50 | 50 | private function mapAdminRoutes() |
| 51 | 51 | { |
| 52 | - $this->adminGroup(function () { |
|
| 53 | - $this->name('foundation.')->group(function () { |
|
| 52 | + $this->adminGroup(function() { |
|
| 53 | + $this->name('foundation.')->group(function() { |
|
| 54 | 54 | Routes\Admin\DashboardRoute::register(); |
| 55 | 55 | Routes\Admin\SettingsRoutes::register(); |
| 56 | 56 | Routes\Admin\SystemRoutes::register(); |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | | ----------------------------------------------------------------- |
| 16 | 16 | */ |
| 17 | 17 | |
| 18 | - const PERMISSION_LIST = 'foundation.routeviewer.list'; |
|
| 18 | + const PERMISSION_LIST = 'foundation.routeviewer.list'; |
|
| 19 | 19 | |
| 20 | 20 | /* ----------------------------------------------------------------- |
| 21 | 21 | | Abilities |
@@ -21,6 +21,6 @@ |
||
| 21 | 21 | public function map() |
| 22 | 22 | { |
| 23 | 23 | $this->get('/', 'DashboardController@index') |
| 24 | - ->name('home'); // admin::foundation.home |
|
| 24 | + ->name('home'); // admin::foundation.home |
|
| 25 | 25 | } |
| 26 | 26 | } |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | { |
| 23 | 23 | $this->prefix('settings')->name('settings.')->group(function () { |
| 24 | 24 | $this->get('/', 'SettingsController@index') |
| 25 | - ->name('index'); // admin::foundation.settings.index |
|
| 25 | + ->name('index'); // admin::foundation.settings.index |
|
| 26 | 26 | }); |
| 27 | 27 | } |
| 28 | 28 | } |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | public function map() |
| 22 | 22 | { |
| 23 | - $this->prefix('settings')->name('settings.')->group(function () { |
|
| 23 | + $this->prefix('settings')->name('settings.')->group(function() { |
|
| 24 | 24 | $this->get('/', 'SettingsController@index') |
| 25 | 25 | ->name('index'); // admin::foundation.settings.index |
| 26 | 26 | }); |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | { |
| 50 | 50 | $this->prefix('information')->name('information.')->group(function () { |
| 51 | 51 | $this->get('/', 'InformationController@index') |
| 52 | - ->name('index'); // admin::foundation.system.information.index |
|
| 52 | + ->name('index'); // admin::foundation.system.information.index |
|
| 53 | 53 | }); |
| 54 | 54 | } |
| 55 | 55 | |
@@ -60,28 +60,28 @@ discard block |
||
| 60 | 60 | { |
| 61 | 61 | $this->prefix('log-viewer')->name('log-viewer.')->group(function () { |
| 62 | 62 | $this->get('/', 'LogViewerController@index') |
| 63 | - ->name('index'); // admin::foundation.system.log-viewer.index |
|
| 63 | + ->name('index'); // admin::foundation.system.log-viewer.index |
|
| 64 | 64 | |
| 65 | 65 | $this->prefix('logs')->name('logs.')->group(function() { |
| 66 | 66 | $this->get('/', 'LogViewerController@listLogs') |
| 67 | - ->name('list'); // admin::foundation.system.log-viewer.logs.list |
|
| 67 | + ->name('list'); // admin::foundation.system.log-viewer.logs.list |
|
| 68 | 68 | |
| 69 | 69 | $this->prefix('{logviewer_log_date}')->group(function () { |
| 70 | 70 | $this->get('/', 'LogViewerController@show') |
| 71 | - ->name('show'); // admin::foundation.system.log-viewer.logs.show |
|
| 71 | + ->name('show'); // admin::foundation.system.log-viewer.logs.show |
|
| 72 | 72 | |
| 73 | 73 | $this->get('download', 'LogViewerController@download') |
| 74 | - ->name('download'); // admin::foundation.system.log-viewer.logs.download |
|
| 74 | + ->name('download'); // admin::foundation.system.log-viewer.logs.download |
|
| 75 | 75 | |
| 76 | 76 | $this->get('{level}', 'LogViewerController@showByLevel') |
| 77 | - ->name('filter'); // admin::foundation.system.log-viewer.logs.filter |
|
| 77 | + ->name('filter'); // admin::foundation.system.log-viewer.logs.filter |
|
| 78 | 78 | |
| 79 | 79 | $this->get('{level}/search', 'LogViewerController@search') |
| 80 | - ->name('search'); // admin::foundation.system.log-viewer.logs.search |
|
| 80 | + ->name('search'); // admin::foundation.system.log-viewer.logs.search |
|
| 81 | 81 | |
| 82 | 82 | $this->delete('delete', 'LogViewerController@delete') |
| 83 | - ->middleware('ajax') |
|
| 84 | - ->name('delete'); // admin::foundation.system.log-viewer.logs.delete |
|
| 83 | + ->middleware('ajax') |
|
| 84 | + ->name('delete'); // admin::foundation.system.log-viewer.logs.delete |
|
| 85 | 85 | }); |
| 86 | 86 | }); |
| 87 | 87 | }); |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | { |
| 95 | 95 | $this->prefix('routes')->name('routes.')->group(function () { |
| 96 | 96 | $this->get('/', 'RoutesController@index') |
| 97 | - ->name('index'); // admin::foundation.system.routes.index |
|
| 97 | + ->name('index'); // admin::foundation.system.routes.index |
|
| 98 | 98 | }); |
| 99 | 99 | } |
| 100 | 100 | } |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | */ |
| 21 | 21 | public static function bindings() |
| 22 | 22 | { |
| 23 | - (new static)->bind('logviewer_log_date', function ($date) { |
|
| 23 | + (new static)->bind('logviewer_log_date', function($date) { |
|
| 24 | 24 | return log_viewer()->get($date); |
| 25 | 25 | }); |
| 26 | 26 | } |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | */ |
| 31 | 31 | public function map() |
| 32 | 32 | { |
| 33 | - $this->namespace('System')->prefix('system')->name('system.')->group(function () { |
|
| 33 | + $this->namespace('System')->prefix('system')->name('system.')->group(function() { |
|
| 34 | 34 | $this->registerSystemInformationRoutes(); |
| 35 | 35 | $this->registerLogViewerRoutes(); |
| 36 | 36 | $this->registerRouteViewerRoutes(); |
@@ -47,9 +47,9 @@ discard block |
||
| 47 | 47 | */ |
| 48 | 48 | private function registerSystemInformationRoutes() |
| 49 | 49 | { |
| 50 | - $this->prefix('information')->name('information.')->group(function () { |
|
| 50 | + $this->prefix('information')->name('information.')->group(function() { |
|
| 51 | 51 | $this->get('/', 'InformationController@index') |
| 52 | - ->name('index'); // admin::foundation.system.information.index |
|
| 52 | + ->name('index'); // admin::foundation.system.information.index |
|
| 53 | 53 | }); |
| 54 | 54 | } |
| 55 | 55 | |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | */ |
| 59 | 59 | private function registerLogViewerRoutes() |
| 60 | 60 | { |
| 61 | - $this->prefix('log-viewer')->name('log-viewer.')->group(function () { |
|
| 61 | + $this->prefix('log-viewer')->name('log-viewer.')->group(function() { |
|
| 62 | 62 | $this->get('/', 'LogViewerController@index') |
| 63 | 63 | ->name('index'); // admin::foundation.system.log-viewer.index |
| 64 | 64 | |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | $this->get('/', 'LogViewerController@listLogs') |
| 67 | 67 | ->name('list'); // admin::foundation.system.log-viewer.logs.list |
| 68 | 68 | |
| 69 | - $this->prefix('{logviewer_log_date}')->group(function () { |
|
| 69 | + $this->prefix('{logviewer_log_date}')->group(function() { |
|
| 70 | 70 | $this->get('/', 'LogViewerController@show') |
| 71 | 71 | ->name('show'); // admin::foundation.system.log-viewer.logs.show |
| 72 | 72 | |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | */ |
| 93 | 93 | private function registerRouteViewerRoutes() |
| 94 | 94 | { |
| 95 | - $this->prefix('routes')->name('routes.')->group(function () { |
|
| 95 | + $this->prefix('routes')->name('routes.')->group(function() { |
|
| 96 | 96 | $this->get('/', 'RoutesController@index') |
| 97 | 97 | ->name('index'); // admin::foundation.system.routes.index |
| 98 | 98 | }); |
@@ -183,7 +183,7 @@ |
||
| 183 | 183 | return redirect()->route('admin::foundation.system.log-viewer.logs.show', [$log->date]); |
| 184 | 184 | |
| 185 | 185 | $levels = $this->logViewer->levelsNames(); |
| 186 | - $entries = $log->entries($level)->filter(function (LogEntry $value) use ($query) { |
|
| 186 | + $entries = $log->entries($level)->filter(function(LogEntry $value) use ($query) { |
|
| 187 | 187 | return Str::contains($value->header, $query); |
| 188 | 188 | })->paginate($this->perPage); |
| 189 | 189 | |
@@ -152,8 +152,9 @@ discard block |
||
| 152 | 152 | { |
| 153 | 153 | $this->authorize(LogViewerPolicy::PERMISSION_SHOW); |
| 154 | 154 | |
| 155 | - if ($level == 'all') |
|
| 156 | - return redirect()->route('admin::foundation.system.log-viewer.logs.show', [$log->date]); |
|
| 155 | + if ($level == 'all') { |
|
| 156 | + return redirect()->route('admin::foundation.system.log-viewer.logs.show', [$log->date]); |
|
| 157 | + } |
|
| 157 | 158 | |
| 158 | 159 | $levels = $this->logViewer->levelsNames(); |
| 159 | 160 | $entries = $this->logViewer->entries($log->date, $level)->paginate($this->perPage); |
@@ -179,8 +180,9 @@ discard block |
||
| 179 | 180 | */ |
| 180 | 181 | public function search(Log $log, $level = 'all', Request $request) |
| 181 | 182 | { |
| 182 | - if (is_null($query = $request->get('query'))) |
|
| 183 | - return redirect()->route('admin::foundation.system.log-viewer.logs.show', [$log->date]); |
|
| 183 | + if (is_null($query = $request->get('query'))) { |
|
| 184 | + return redirect()->route('admin::foundation.system.log-viewer.logs.show', [$log->date]); |
|
| 185 | + } |
|
| 184 | 186 | |
| 185 | 187 | $levels = $this->logViewer->levelsNames(); |
| 186 | 188 | $entries = $log->entries($level)->filter(function (LogEntry $value) use ($query) { |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | 'name' => 'LogViewer Manager', |
| 26 | 26 | 'description' => 'The LogViewer manager role.', |
| 27 | 27 | 'is_locked' => true, |
| 28 | - ],[ |
|
| 28 | + ], [ |
|
| 29 | 29 | 'name' => 'RouteViewer Manager', |
| 30 | 30 | 'description' => 'The RouteViewer manager role.', |
| 31 | 31 | 'is_locked' => true, |