Pre-requisites
Check to see if you already have a controller for this model.
When the model was created using the approach in this blog post, a controller was created.
By running:
php artisan make:controller
you are provided with a list of prompts:
- You're asked to give it a name. I like to give it the same name as the model I just created.
- You're asked to select the type of controller to create. For this example, I like to select API.
- You're asked to select the model that this API controller would be used for. Here I name the model I just created.
No comments:
Post a Comment