So, I am going to create an ionic 3 project that use my existing laravel backend. My laravel project is on heroku (for now) and it is already setup with laravel passport and API based in mind, since I already created frontend for laravel with SPA vuejs and already configured cors too.
So I supposed it shouldn't be any problem from my backend to communicated with client side. But I am not very experienced with ionic 3, and the problem is I can't find any one talking straight forward about how to implement basic authentication with laravel passport to ionic 3 and also the basic http request like post, get, delete, and put/patch.
Most of the tutorials are about working with firebase, and me myself is not very familiar with firebase and not willing to invest time to those since all my backend needs are already satisfied with laravel. I also found 1 or 2 site talking about laravel and ionic but i think it is from very different version of ionic since the file structure and the way he working is very different from what I've known (beside those article already 1-2 years old now)
So maybe anyone that have a tutorial about all this thing can share it to me?
Related
This question already has answers here:
Laravel 5.1 API Enable Cors
(9 answers)
Closed last month.
Can anyone show me how to get and post data with API in flutter? I have tried some flutter API tutorials with Laravel but when I print the value is error cors, something wrong with my flutter code or my API? or there are some settings in laravel when i create API?
create CRUD in Flutter using API from laravel
I think You are having CORS issue from your mobile app. From the backend (laravel) you need to allow the request from your specific IP or even you can allow for all the domains. Please refer to this link on how to enable CORS on laravel. https://www.stackhawk.com/blog/laravel-cors/
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}
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
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.