Is there a specific framework out there for PHP to write a REST web service and expose it to JSON?
Or you just basically code it...
I am writing a REST web service, mostly to communicate with a database in MySQL, authentication, etc...
What advantages is there with a framework? Is it more secure?
CodeIgniter is the top choice for a beginner-friendly PHP framework that is easy to use and quick to learn. It works on the MVC architecture, is easy to install, offers several guides and is easy to understand for beginners to get started with developing web applications on PHP.
The Zend Framework Because of their massive following, extensive support and active user base, Zend is referred to as “The PHP Company”. Zend is one of, if not, the most popular PHP frameworks available today.
Since PHP can obviously handle HTTP requests, it has everything you need to build RESTful API's. The whole point of frameworks is to handle common tasks and things that are otherwise tedious. REST API's are commonly built with PHP, so a plethora of frameworks exist.
PHP REST API: Lumen Lumen is a micro-API framework made out of Laravel. Specially designed for building REST APIs, this framework cuts off all Laravel features that restrict stateless APIs.
Have a look at Frapi. Here is the documentation for it.
As for the reasoning, similar to a normal PHP framework.
etc etc
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With