| Conditions | 4 |
| Paths | 6 |
| Total Lines | 22 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 10 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 16 | public function index() |
||
| 17 | { |
||
| 18 | |||
| 19 | if (Input::get('l')) { |
||
| 20 | LaravelLogViewer::setFile(base64_decode(Input::get('l'))); |
||
| 21 | } |
||
| 22 | |||
| 23 | if (Input::get('dl')) { |
||
| 24 | return Response::download(LaravelLogViewer::pathToLogFile(base64_decode(Input::get('dl')))); |
||
| 25 | } elseif (Input::has('del')) { |
||
| 26 | File::delete(LaravelLogViewer::pathToLogFile(base64_decode(Input::get('del')))); |
||
| 27 | return Redirect::to(Request::url()); |
||
| 28 | } |
||
| 29 | |||
| 30 | $logs = LaravelLogViewer::all(); |
||
| 31 | |||
| 32 | return View::make('laravel-log-viewer::log', [ |
||
| 33 | 'logs' => $logs, |
||
| 34 | 'files' => LaravelLogViewer::getFiles(true), |
||
| 35 | 'current_file' => LaravelLogViewer::getFileName() |
||
| 36 | ]); |
||
| 37 | } |
||
| 38 | } |
||
| 39 |