PagesController::__invoke()   A
last analyzed

Complexity

Conditions 2
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 2
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Rinvex\Pages\Http\Controllers;
6
7
use Illuminate\Http\Request;
8
use Illuminate\Routing\Controller;
9
10
class PagesController extends Controller
11
{
12
    public function __invoke(Request $request)
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
13
    {
14
        $page = app('rinvex.pages.page')->where('uri', $request->route()->uri())->where('domain', $request->route()->domain() ?: null)->first();
15
16
        return view($page->view, compact('page'));
17
    }
18
}
19