Support the ongoing development of Laravel.io →
Architecture
Last updated 2 years ago.
0
Solution

Maybe it's because Resource controller. See:

http://laravel.com/docs/5.1/controllers

0

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

0

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.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

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

Your logo here?

Laravel.io

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

© 2024 Laravel.io - All rights reserved.