Passed
Push — dev6 ( 6ea9a3...2cfb0e )
by Ron
15:41
created

GetLinkedController   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 2
c 1
b 0
f 0
dl 0
loc 8
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 3 1
1
<?php
2
3
namespace App\Http\Controllers\Customers;
4
5
use App\Http\Controllers\Controller;
6
use App\Models\Customer;
7
use Illuminate\Http\Request;
8
9
class GetLinkedController extends Controller
10
{
11
    /**
12
     * Get all customers that are linked to a specific parent customer
13
     */
14
    public function __invoke($cust_id)
15
    {
16
        return Customer::where('parent_id', $cust_id)->get();
17
    }
18
}
19