Conditions | 4 |
Paths | 4 |
Total Lines | 17 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
31 | public function compose(View $view) |
||
32 | { |
||
33 | $theme = null; |
||
34 | |||
35 | if (Auth::check()) { |
||
36 | $user = $this->user; |
||
37 | |||
38 | if ($user->profile) { |
||
39 | $theme = Theme::find($user->profile->theme_id); |
||
40 | |||
41 | if ($theme->status === 0) { |
||
|
|||
42 | $theme = Theme::find(Theme::default); |
||
43 | } |
||
44 | } |
||
45 | } |
||
46 | |||
47 | $view->with('theme', $theme); |
||
48 | } |
||
50 |