🏏

Route Model Binding

Inject route and model to perform database related task in least code that possible
  1. make a model
  1. make a controller

Database Structure

notion image
to fetch all the data based on id
Screentshots
notion image
notion image
to fetch based on name
Screentshots
notion image
notion image
It will give only one data entry in return but to get all the data
notion image