Backend API | Laravel 8 API basic | Create Router in Backend

Опубликовано: 10 Октябрь 2024
на канале: Kicks Me
30
1

Introduce to API router in Laravel 8
#Command:
1. Create Controller with (--Resource)
php artisan make:controll PersonController --resource
Laravel 8 will default generate with 7 methods (2 methods like "Create & Edit" won't use in backend API)

2. Create Controller with (--API)
php artisan make:controll PersonController --resource
Laravel 8 will default generate 5 methods that excludes methods "Create & Edit"

3. List all current router path
php artisan route:list
(for list all current router path)
php artisan route:list --path=api
(for list all current api router path)

Download Project
https://github.com/sai-Yang/Router-AP...

Document
https://drive.google.com/file/d/1xBq1...