Store::__invoke()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 2
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace App\Http\Controllers\Sourcerefeven;
4
5
use App\Http\Requests\ValidateSourceRefEvenRequest;
6
use App\Models\SourceRefEven;
7
use Illuminate\Routing\Controller;
8
9
class Store extends Controller
10
{
11
    public function __invoke(ValidateSourceRefEvenRequest $request, SourceRefEven $sourceRefEven)
12
    {
13
        $sourceRefEven->fill($request->validated())->save();
14
15
        return [
16
            'message' => __('The source ref even was successfully created'),
17
            'redirect' => 'sourcerefeven.edit',
18
            'param' => ['sourceRefEven' => $sourceRefEven->id],
19
        ];
20
    }
21
}
22