-2

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
  • 1
    If the route is unique for all then it is possible. Commented Sep 7, 2022 at 11:47

1 Answer 1

0

it can

controller example

public function show(Request $request, $supplier_id, $item_id, $id)
{
    // ...
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.