Completed
Push — develop ( 309d0f...13c676 )
by Abdelrahman
01:03
created

PagesController   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 9
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Rinvex\Pages\Http\Controllers;
6
7
use Illuminate\Http\Request;
8
use Rinvex\Pages\Models\Page;
9
use Illuminate\Routing\Controller;
10
11
class PagesController extends Controller
12
{
13
    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...
14
    {
15
        $page = Page::where('uri', $request->route()->uri())->where('domain', $request->route()->domain())->first();
16
17
        return view($page->view, compact('page'));
18
    }
19
}
20