I'm currently developing a web application and I expect a lot of visitors (potential thousands of concurrent visitors). For this reason I prefer the Lumen Framework over Laravel because of the size and better performance. But I miss some things that are excluded from Lumen since the last version, like sessions, views and session authentication.
So I have a choice: using the heavier Laravel framework, or use Lumen and add some Laravel components I need. My question is: what is better?
I know I can test some things on my own but I'm not that experienced and I'm wondering if anyone has some good pros or cons (or if you have another alternative I'm curious too).
I recommend you use Laravel for your purpose. Lumen 5.2 doesn't have views, sessions and can be a bit frustrating create a big website. And since the new version, not her philosophy. Lumen is now focused on JSON API's.
Only Stateless APIs
Lumen 5.2 represents a shift on slimming Lumen to focus solely on serving stateless, JSON APIs. As such, sessions and views are no longer included with the framework.
If you need access to these features, you should use the full Laravel framework.
https://lumen.laravel.com/docs/5.2/releases#5.2.0
If you need an API, is the perfect place to use Lumen. Share the database with the Laravel app (that will contains all the business logic) and you will have a fast API
Related
while building with Laravel probably you may have faced the same situation where you have a RESTful service with JSON replies and, at the same time, you need to have a frontend able to consume those APIs to offer a web interface.
Now, the most obvious solution would be to use Laravel Blade template engine and to diversify routes according to the address (/resource or /api/resource). However, this approach brings in an additional burden, directly reflected in controllers, where are you have to consider not only the reply itself but also whether it comes from a device or from the web interface and reply accordingly.
I have also seen a lot of frontends actually detached from the backend and built using serverless technologies such as Angular or React, so that both the web interface and the mobile app consume the same APIs and the backend can be much simplified.
Let's take as an example a "Uber for..." service consisting of a native app, a PWA and an admin interface (web), which approach would be the most advisable and why?
Anyone know if the best aproach to use laravel and angular is to use angular as Front-End and laravel as back end , or can i use both of them in all in One ?
In the case of each option can you explain please why is that the best aproach ?
Thanks Guys !
The best approach is to create a RESTFUL api in laravel as the backend, and use angular as the font-end client. This is currently the most popular approach as angular is great for creating what are known as "Single Page Applications" (SPA's). SPA's are popular because they allow you to create a seamless user experience by appropriately handling asynchronous behaviour. By keeping your REST api separate from your UI, you can also then add other clients as needed, such as a mobile/native client.
I need some suggestion and possibilities...
I have a product whose back-end is on Laravel 5.0 and front-end is built on Angular 2
Due to some SEO issues I am rewriting the front-end in Laravel.
Here I wanted to know that if I am creating new Laravel front-end app THEN how could I communicate/use/request my pre-built back-end APIs without using cURL for best I/O response time.
Our company is about to start a real estate project and have decided to go with the laravel 5.3 framework. The first phase is to write the apis and then these apis will be consumed by the mobile team and the frontend team to build the official mobile app and the web portal respectively.
Now I am confused whether to use laravel's built-in Resource controllers (as instructed in this tutorial http://www.programmableweb.com/news/how-to-build-restful-apis-using-php-and-laravel/how-to/2014/08/13) or use the Dingo Api framework.
Could you please help me which one should I go for and why as per the requirements i mentioned above?
Thanks in advance
Since, Laravel 5.3 comes with Passport (for api authentication), I would suggest you to use Resource controller, which is very simple and easy to work with, and also it create a meaningful end points
Route::resource('post','PostController');
GET /post/{post}
POST /post
EDIT /post/{post}/edit
DELETE /post/{post}
Taylor Otwell recently released a new framework called Lumen. I am a big user of Laravel.
Can any one point out the difference between Laravel and Lumen micro framework.
What is micro framework all about and when should one use it.
Laravel is doing quite a lot of initialization during each request. With Lumen processing each request is much faster so it is supposed to be able to handle even more load than Laravel with all its caching.
This means that Lumen is less configurable but is able to handle more requests per second.