Completed
Push — master ( e64b38...35d2cf )
by Brandon
02:23
created

UsersController::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
ccs 0
cts 3
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace App\Http\Controllers;
4
5
use App\DataTables\UsersDataTable;
6
use Illuminate\Http\Request;
7
use App\Http\Controllers\Controller;
8
9
class UsersController extends Controller
10
{
11
    /**
12
     * Create a new controller instance.
13
     *
14
     * @return void
0 ignored issues
show
Comprehensibility Best Practice introduced by
Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value.

Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.

Please refer to the PHP core documentation on constructors.

Loading history...
15
     */
16
    public function __construct()
17
    {
18
        $this->middleware('auth');
19
    }
20
    
21
    /**
22
     * Display index page and process dataTable ajax request.
23
     *
24
     * @param \App\DataTables\UsersDataTable $dataTable
25
     * @return \Illuminate\Http\JsonResponse|\Illuminate\View\View
26
     */
27
    public function index(UsersDataTable $dataTable)
28
    {
29
        return $dataTable->render('users.index');
30
    }
31
32
    /**
33
     * Show create user page.
34
     *
35
     * @return \BladeView|bool|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
36
     */
37
    public function create()
38
    {
39
        return view('users.create');
40
    }
41
}
42