You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, for all controller handlers that require dealing with a record on a database, we're passing the id of the instance and fetching the corresponding instance on the controller and doing the stuff required. It's more clean to make a DI on the controller to retrieve the model instance directly.
Changing from this for example:
publicfunctionunlockById($id) {
$track = Track::find($id);
// other stuff
}
To this:
publicfunctionunlockById(Track$track) {
// other stuff
}
The text was updated successfully, but these errors were encountered:
Currently, for all controller handlers that require dealing with a record on a database, we're passing the
id
of the instance and fetching the corresponding instance on the controller and doing the stuff required. It's more clean to make a DI on the controller to retrieve the model instance directly.Changing from this for example:
To this:
The text was updated successfully, but these errors were encountered: