Completed
Push — master ( adb8c3...d72efb )
by ARCANEDEV
10s
created

Controller::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 4
rs 10
1
<?php namespace Arcanedev\LogViewer\Http\Controllers;
2
3
use Illuminate\Routing\Controller as IlluminateController;
4
5
/**
6
 * Class     Controller
7
 *
8
 * @package  Arcanedev\LogViewer\Bases
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
abstract class Controller extends IlluminateController
12
{
13
    /* ------------------------------------------------------------------------------------------------
14
     |  Properties
15
     | ------------------------------------------------------------------------------------------------
16
     */
17
    /**
18
     * The log viewer instance
19
     *
20
     * @var \Arcanedev\LogViewer\Contracts\LogViewer
21
     */
22
    protected $logViewer;
23
24
    /* ------------------------------------------------------------------------------------------------
25
     |  Constructor
26
     | ------------------------------------------------------------------------------------------------
27
     */
28
    public function __construct()
29
    {
30
        $this->logViewer = app('arcanedev.log-viewer');
31
    }
32
33
    /* ------------------------------------------------------------------------------------------------
34
     |  Main Functions
35
     | ------------------------------------------------------------------------------------------------
36
     */
37
    /**
38
     * Get the evaluated view contents for the given view.
39
     *
40
     * @param  string  $view
41
     * @param  array   $data
42
     * @param  array   $mergeData
43
     *
44
     * @return \Illuminate\View\View
45
     */
46
    public function view($view, $data = [], $mergeData = [])
47
    {
48
        return view('log-viewer::' . $view, $data, $mergeData);
49
    }
50
}
51