| Conditions | 1 |
| Paths | 1 |
| Total Lines | 26 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public function boot() |
||
| 17 | { |
||
| 18 | // View |
||
| 19 | View::addNamespace('Admin', base_path() . '/resources/views/Admin'); |
||
| 20 | View::addNamespace('Blog', base_path() . '/resources/views/Blog'); |
||
| 21 | View::addNamespace('Auth', base_path() . '/resources/views/Auth'); |
||
| 22 | View::addNamespace('Discuss', base_path() . '/resources/views/Discuss'); |
||
| 23 | |||
| 24 | // Pagination |
||
| 25 | Paginator::defaultView('vendor.pagination.bootstrap-4'); |
||
| 26 | |||
| 27 | // Blade |
||
| 28 | Blade::directive('auth', function () { |
||
| 29 | return "<?php if (Auth::check()): ?>"; |
||
| 30 | }); |
||
| 31 | Blade::directive('endauth', function () { |
||
| 32 | return "<?php endif; ?>"; |
||
| 33 | }); |
||
| 34 | |||
| 35 | Blade::directive('notauth', function () { |
||
| 36 | return "<?php if (!Auth::check()): ?>"; |
||
| 37 | }); |
||
| 38 | Blade::directive('endnotauth', function () { |
||
| 39 | return "<?php endif; ?>"; |
||
| 40 | }); |
||
| 41 | } |
||
| 42 | |||
| 53 |