Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

lazaros.papanikolaoy@gmail.com's avatar

CREATE REST API WITH OR WITHOUT FRAMEWORK?

Whats the difference between building a rest api with and without framework?

0 likes
6 replies
jlrdw's avatar

Also, with all laravel has to offer, you should really consider using the framework, in conjunction with viewing videos on the subject, many are free.

Also make sure an API is even needed.

martinbean's avatar

@lazaros.papanikolaoy@gmail.com As mentioned by @snapey, the level of effort.

If you don’t use a framework, then you’re starting from scratch and have to do all the same, repetitive tasks such as setting up a router, handling HTTP requests, returning HTTP responses, middleware for any caching or content negotiation… Basically all the stuff you get out of the box with a full stack web framework like Laravel.

So, do you want to spend works laying the foundation and writing code to solve problems that have already been solved a thousand times before you? Or do you just want to start writing the code for your application, which you can do if you just start with a clean installation of something like Laravel?

1 like
lazaros.papanikolaoy@gmail.com's avatar

@martinbean thanks for replying. Actually i want to create a rest api for otp authentication for my own application, so i think that the best way is to create api without framework because i want to handle only with http requests.

martinbean's avatar

So why are you asking the question if you‘ve already decided on the path you’re going to take…?

lazaros.papanikolaoy@gmail.com's avatar

Yes,but is my thought true? I mean that is better to create api without framework, when i want only to accept http requests?

Please or to participate in this conversation.