@@ -2,6 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | // Auth::routes(); |
| 4 | 4 | |
| 5 | -Route::middleware(['web'])->namespace('MoriTiza\LaraLog\Http\Controllers')->group(function () { |
|
| 5 | +Route::middleware(['web'])->namespace('MoriTiza\LaraLog\Http\Controllers')->group(function() { |
|
| 6 | 6 | Route::get('logs', 'LaraLogController@index'); |
| 7 | 7 | }); |
@@ -105,7 +105,7 @@ |
||
| 105 | 105 | if ($value === trim('[stacktrace]') || $value === trim('"}') || trim($value) == null || preg_match('/^#[0-9]+[\' \']/', $value) || preg_match('/^\[previous exception\] \[object\]/', $value)) { |
| 106 | 106 | unset($this->singleLogs[$key]); |
| 107 | 107 | } |
| 108 | - } |
|
| 108 | + } |
|
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | private function deleteAdditionalDailyLogs($dailyLogs) |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | |
| 29 | 29 | $logQuery = $request->input('log'); |
| 30 | 30 | |
| 31 | - if (isset($logQuery) && (! is_null($logQuery)) && array_key_exists($logQuery, $this->dailyLogs)) { |
|
| 31 | + if (isset($logQuery) && (!is_null($logQuery)) && array_key_exists($logQuery, $this->dailyLogs)) { |
|
| 32 | 32 | $currentLog = $logQuery; |
| 33 | 33 | } elseif (file_exists(storage_path('logs/laravel.log'))) { // me |
| 34 | 34 | $currentLog = 'laravel'; |
@@ -43,21 +43,21 @@ discard block |
||
| 43 | 43 | $logsCollection = collect($singleLogs); |
| 44 | 44 | $perPage = 5; |
| 45 | 45 | $currentPageItems = $logsCollection->slice(($currentPage * $perPage) - $perPage, $perPage)->all(); |
| 46 | - $paginatedSingleLogs = new LengthAwarePaginator($currentPageItems , count($logsCollection), $perPage); |
|
| 46 | + $paginatedSingleLogs = new LengthAwarePaginator($currentPageItems, count($logsCollection), $perPage); |
|
| 47 | 47 | $paginatedSingleLogs->setPath($request->url()); |
| 48 | - } elseif (isset($logQuery) && (! is_null($logQuery)) && array_key_exists($logQuery, $this->dailyLogs)) { |
|
| 48 | + } elseif (isset($logQuery) && (!is_null($logQuery)) && array_key_exists($logQuery, $this->dailyLogs)) { |
|
| 49 | 49 | $currentPage = LengthAwarePaginator::resolveCurrentPage(); |
| 50 | 50 | $logsCollection = collect(array_reverse($dailyLogs[$logQuery])); |
| 51 | 51 | $perPage = 5; |
| 52 | 52 | $currentPageItems = $logsCollection->slice(($currentPage * $perPage) - $perPage, $perPage)->all(); |
| 53 | - $paginatedDailyLogs = new LengthAwarePaginator($currentPageItems , count($logsCollection), $perPage); |
|
| 53 | + $paginatedDailyLogs = new LengthAwarePaginator($currentPageItems, count($logsCollection), $perPage); |
|
| 54 | 54 | $paginatedDailyLogs->setPath('logs?log=' . $currentLog); |
| 55 | 55 | } elseif (count($dailyLogs) > 0) { |
| 56 | 56 | $currentPage = LengthAwarePaginator::resolveCurrentPage(); |
| 57 | 57 | $logsCollection = collect(array_reverse($dailyLogs[$currentLog])); |
| 58 | 58 | $perPage = 5; |
| 59 | 59 | $currentPageItems = $logsCollection->slice(($currentPage * $perPage) - $perPage, $perPage)->all(); |
| 60 | - $paginatedDailyLogs = new LengthAwarePaginator($currentPageItems , count($logsCollection), $perPage); |
|
| 60 | + $paginatedDailyLogs = new LengthAwarePaginator($currentPageItems, count($logsCollection), $perPage); |
|
| 61 | 61 | $paginatedDailyLogs->setPath('logs?log=' . $currentLog); |
| 62 | 62 | } |
| 63 | 63 | |