| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php namespace Distilleries\Expendable\Http\Controllers\Backend\Base; |
||
| 9 | public function display(Exception $exception, $code) |
||
| 10 | { |
||
| 11 | $class = ($code == 404) ? 'page-404' : 'page-500'; |
||
| 12 | |||
| 13 | $content = view('expendable::admin.errors.default', [ |
||
| 14 | 'code' => $code, |
||
| 15 | 'class' => $class, |
||
| 16 | 'message' => $exception->getMessage(), |
||
| 17 | ]); |
||
| 18 | |||
| 19 | |||
| 20 | $this->layoutManager->add([ |
||
| 21 | 'class_layout'=>$class . '-full-page', |
||
| 22 | 'content'=>$content, |
||
| 23 | ]); |
||
| 24 | |||
| 25 | return response()->make($this->layoutManager->render(), $code); |
||
| 26 | } |
||
| 27 | |||
| 36 | } |