Completed
Push — master ( a3496d...130652 )
by Jeremy
15:26
created

BlogSettingsComposer::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace App\Http\ViewComposers;
4
5
use App\Models\Theme;
6
use App\Services\BlogThemeServices;
7
use Illuminate\View\View;
8
9
class BlogSettingsComposer
10
{
11
    protected $theme;
12
13
    /**
14
     * Create a new instance.
15
     *
16
     * @return void
17
     */
18
    public function __construct()
19
    {
20
        $this->theme = BlogThemeServices::getBlogTheme();
21
    }
22
23
    /**
24
     * Bind data to the view.
25
     *
26
     * @param View $view
27
     *
28
     * @return void
29
     */
30
    public function compose(View $view)
31
    {
32
        $data = [
33
            'theme' => $this->theme,
34
        ];
35
36
        $view->with($data);
37
    }
38
}
39