HomeController::__construct()   A
last analyzed

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\Controllers;
4
5
use Illuminate\Http\Request;
6
7
class HomeController extends Controller
8
{
9
    /**
10
     * Create a new controller instance.
11
     *
12
     * @return void
13
     */
14
    public function __construct()
15
    {
16
        $this->middleware('auth');
17
    }
18
19
    /**
20
     * Show the application dashboard.
21
     *
22
     * @return \Illuminate\View\View
23
     */
24
    public function index()
25
    {
26
        $this->seo()->setTitle('My Projects');
27
        $this->seo()->setDescription('Here is where you can access all of your projects to log time, create milestones etc.');
28
        
29
        $projects = auth()->user()->projects;
30
31
        return view('home', compact('projects'));
32
    }
33
}
34