Launching Restaurants APIs
Learn how to set up the building blocks of the new module in a way that facilitates easy maintenance.
We'll cover the following...
We'll cover the following...
Migration and Eloquent model
Each new module starts with a database table. Here as well, we will first create the restaurants table first. Let’s go through the migration file first:
The columns are self-explanatory. We have only kept a few columns compulsory. We are also going to use the ‘Soft Delete’ feature to archive the records instead of deleting them. ...