laravel nested controller with 3 model

Viewed 31

is possible to use 3 model in laravel nested controller?

this my route now:

...
'supplier' => SupplierController::class,
'supplier.item' => SupplierItemController::class,
...

i want to use 3 like this one:

...
'supplier' => SupplierController::class,
'supplier.item' => SupplierItemController::class,
'supplier.item.price' => SupplierItemPriceController::class,
...

is that possible, or i should use another method for this one. i am worry is i do that i won't work or is not the best way to do it.

thanks

1 Answers

it can

controller example

public function show(Request $request, $supplier_id, $item_id, $id)
{
    // ...
}
Related