Understanding the basics of what is REST and HTTP almost any framework of route control can easily create a REST application, I recommend you read:
I recommend you understand the basics of HTTP as well, as this is the basics of REST:
It is not possible to indicate the best framework, but for PHP, almost any framework that works with routes will easily serve for REST, list of frameworks and micro-frameworks:
If your current application is Laravel and you need to take advantage of the existing rules or Models in your Laravel project, you can use the Resource controllers, for example:
Route::resource('photos', 'PhotoController');
The PhotoController
is your class and photos
is the "prefix" of the route, which can be accessed:
Verb |
URI |
Method |
Route name |
GET |
/photos |
index |
photos.index |
GET |
/photos/create |
create |
photos.create |
POST |
/photos |
store |
photos.store |
GET |
/photos/{photo} |
show |
photos.show |
GET |
/photos/{photo}/edit |
edit |
photos.edit |
PUT/PATCH |
/photos/{photo} |
update |
photos.update |
DELETE |
/photos/{photo} |
destroy |
photos.destroy |
In this case the best will be the one you know how to use. If you do not know any, see the one you like best and study it. Without having defined metrics, defining the best is merely a matter of personal opinion, and for this reason I voted to close the question as based on opinion.
– Woss
To create API Rest in PHP I recommend using LUMEN. It is very simple and the documentation is very good https://lumen.laravel.com/
– rodrigo.oliveira
This is the idea of the question. Documentation is important, it is no use to indicate me a Framework that does not find documentation.. Thanks!!
– RRV