mardi 4 février 2020

Setting DB connection when resolving route models

I have read only routes such as /api/orders/{order} and I would like to point the model to the specific reader connection at the time Laravel hydrates the model in the route before it passes it into the controller such as public function show(Order $order) { ... }

I don't want it to affect all routes.

How would I do this?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire