Laravel-Challenge-Route-Model-Binding icon indicating copy to clipboard operation
Laravel-Challenge-Route-Model-Binding copied to clipboard

All 3 tasks fixes

Open JahanzaibHussain opened this issue 3 years ago • 2 comments

Task 1 Solution: we need to add the full path of class or we can specify the name space of the modal class.

Task 2 Solution: if we route using route model binding we need to pass single object as query parameter in the web.php like 'transactions' to single 'transaction'.

Task 3 Solution: if we not specify any of column in web.php route, it will use 'id' by default.. in our case we need to define uuid column "transaction:uuid" other wise this will search by id.

JahanzaibHussain avatar Jul 25 '21 06:07 JahanzaibHussain

@JahanzaibHussain all correct, well done, and also with the explanation.

PovilasKorop avatar Jul 25 '21 06:07 PovilasKorop

Thanks

On Sun, 25 Jul 2021, 11:45 am PovilasKorop, @.***> wrote:

@JahanzaibHussain https://github.com/JahanzaibHussain all correct, well done, and also with the explanation.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/LaravelDaily/Laravel-Challenge-Route-Model-Binding/pull/15#issuecomment-886155495, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEAVOC3X6OW46QGOQJ42DJDTZOXHJANCNFSM5A6HJDTQ .

JahanzaibHussain avatar Jul 25 '21 07:07 JahanzaibHussain