Completed
Push — master ( 689d16...aae2ef )
by Jeremy
05:01
created

AdminDetailsController::activeUsers()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
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 5
rs 9.4285
1
<?php
2
3
namespace App\Http\Controllers;
4
5
use App\Models\User;
6
use Illuminate\Support\Facades\Route;
7
8
class AdminDetailsController extends Controller
9
{
10
    /**
11
     * Create a new controller instance.
12
     *
13
     * @return void
14
     */
15
    public function __construct()
16
    {
17
        $this->middleware('auth');
18
    }
19
20
    /**
21
     * Display a listing of the resource.
22
     *
23
     * @return \Illuminate\Http\Response
24
     */
25
    public function listRoutes()
26
    {
27
        $routes = Route::getRoutes();
28
        $data = [
29
            'routes' => $routes,
30
        ];
31
32
        return view('pages.admin.route-details', $data);
33
    }
34
35
    /**
36
     * Display php info page.
37
     *
38
     * @return \Illuminate\Http\Response
39
     */
40
    public function listPHPInfo()
41
    {
42
        return view('pages.admin.php-details');
0 ignored issues
show
Bug Best Practice introduced by
The expression return view('pages.admin.php-details') returns the type Illuminate\View\View which is incompatible with the documented return type Illuminate\Http\Response.
Loading history...
43
    }
44
45
    /**
46
     * Display active users page.
47
     *
48
     * @return \Illuminate\Http\Response
49
     */
50
    public function activeUsers()
51
    {
52
        $users = User::count();
53
54
        return view('pages.admin.active-users', ['users' => $users]);
0 ignored issues
show
Bug Best Practice introduced by
The expression return view('pages.admin...ray('users' => $users)) returns the type Illuminate\View\View which is incompatible with the documented return type Illuminate\Http\Response.
Loading history...
55
    }
56
57
}
58