| Conditions | 3 |
| Paths | 3 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public function compose(View $view) |
||
| 17 | { |
||
| 18 | $enable = false; |
||
| 19 | $title = ''; |
||
| 20 | $contents = ''; |
||
| 21 | if (config('kleis.legal_notice')) { |
||
| 22 | $mdfile = public_path('markdown/legal/'.config('kleis.legal_notice').'-'.config('app.locale').'.md'); |
||
| 23 | if (file_exists($mdfile)){ |
||
| 24 | list($title, $text) = explode(PHP_EOL, file_get_contents($mdfile), 2); |
||
| 25 | $enable = true; |
||
| 26 | $contents = Markdown::parse($text)->toHtml(); |
||
| 27 | } |
||
| 28 | } |
||
| 29 | $view->with('enable', $enable) |
||
| 30 | ->with('title', $title) |
||
| 31 | ->with('contents', $contents); |
||
| 32 | } |
||
| 33 | } |
||
| 34 |