Tuesday 18 June 2024

Create a Laravel 11 API Model

Basic Steps

php artisan make:model
Give it a name
You then have a bunch of options for your model. A good place to start, would be to select.
  • Database Seeder
  • Factory
  • Form Requests
  • Migration
  • Resource Controller
Once run, the system gives you a path list of the files created by this process.
You would then be in a good place to create routes for your API. 

No comments:

Post a Comment