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

GetLinkedController::__invoke()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 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