Support the ongoing development of →
Last updated 2 years ago.

Maybe it's because Resource controller. See:


And that's all? It's all about simplifying routes?


In Laravel you can use Resource Controller, that basicalle bind the controller methods with all the possible RESTful methods over HTTP (GET, POST, PUT, PATCH and DELETE) using simple commands in php artisan. Also allow you to use stateless authentication, that is the correct way to validate requests in a RESTful API, also you can easily implement a OAuth2 server to validate access to resources (in RESTful all are resources), you easily modify the session driver to don't keep the state between requests. Of course Laravel provide also some features that can be useful in a RESTful API like eager loading for resources from the database, caching system, prefix routes (to manage versioning for the API), access to the headers, specify response codes, return JSON responses easily.

Basically what you need for a RESTful API is possible in Laravel.

You can found a complete course about RESTful APIs in Laravel here: Create a RESTful API with Laravel and PHP

Hope it helps. Best wishes.

Last updated 9 years ago.

Sign in to participate in this thread!


Your banner here too?


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 - All rights reserved.