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
This creates a new row using placeholder data and returns the new row (as an instance of the model), used for testing (to quickly make new row sif needed, see laravel db factories, felt a whole new file was just pointless)
method takes a generic object and will set props/fields based on the optional param
implemented method will use a schema for the param, so typehints are provided and tsc errors can be produced when using it on each model (as each model has diff fields)
Summary
What:
Add relations to each model, such as if a season belongs to a user, add a new user method to the model that gets the user based on the foreign key
also make base model return instances of each model instead of the raw row data
Why:
This way it’s super easy to get a users comments or users articles etc, querying the db and getting relations is made a lot easier
Acceptance Criteria
Below is a list of tasks that must be completed before this issue can be closed.
The text was updated successfully, but these errors were encountered: