Published on January 9, 2017 by Mindspace

Learn how to use Laravel and Angular 2 or Vue.js 2 together. This videos explains how you may set up a backend with Laravel.

The full source code can be found in the following Github repo (choose the right branch!): github.com/mschwarzmueller/laravel-ng2-vue

Want to dive deeper into Laravel, Angular 2 or Vue.js 2? Consider diving into my courses on Udemy and Pluralsight:
Angular 2 – The Complete Guide: www.udemy.com/the-complete-guide-to-angular-2/?couponCode=YOUTUBE_2
Vue.js 2 – The Complete Guide: www.udemy.com/vuejs-2-the-complete-guide/?couponCode=YOUTUBE_VUE
Laravel – The Basics: www.pluralsight.com/courses/laravel-php-framework-getting-started-the-basics
Laravel – Models & Data: www.pluralsight.com/courses/laravel-php-framework-getting-started-models-data
Building a RESTful API with Laravel: www.pluralsight.com/courses/php-laravel-restful-web-services

Want to get some 1-on-1 coaching with experienced developers? Have a look at Savvy: www.savvy.is/?ref=9fee2b (Discount Code 9fee2b)

You can follow me on Twitter (@maxedapps), Facebook (www.facebook.com/mindspacechannel/) or visit my Website (mschwarzmueller.com).

See you in the videos!

Leave a Reply

65 Comments on "BACKEND WITH LARAVEL | Laravel + Angular 2 / Vue.js 2"

Notify of
avatar

girish sharma
Guest
girish sharma
12 days 3 hours ago

thanks for this tutorial. very helpfull . i have download you code and tring to run but getting this result . The requested URL /laravel-ng2/api/quotes was not found on this server.please assist me where i am missing

Sebastian
Guest
Sebastian
16 days 1 hour ago

I have been trying to get this to work. I can post data to the api, and it returns a response. But it wont associate 'content' with the new quote instantiation. prntscr.com/ew4p1c Any ideas?

Sebastian
Guest
Sebastian
16 days 1 hour ago

{"quote":{"content":null,"updated_at":"2017-04-13 20:16:31","created_at":"2017-04-13 20:16:31","id":4}} content is allways null.

Ahmad rasheed
Guest
Ahmad rasheed
16 days 22 hours ago

thank you it's amazing. can we use just jQuery or Ajax instead? is Vue is alternative of Ajax? your videos is so great.

Mindspace
Guest
Mindspace
16 days 15 hours ago

Thanks for your nice feedback! Ajax is just a technology which allows you to send async Http request ("in the background" without refreshing the page). Vue also supports Ajax but is not an alternative. jQuery also isn't since it's far more limited than vue.

Dave Suico
Guest
Dave Suico
18 days 11 hours ago

I am wondering why we don't have to put X-Requested-With header on adding a new quote whereas on the other videos on signing in and out we have to put it? anyone?

Андрей Васильев
Guest
Андрей Васильев
25 days 21 hours ago
Hello Max, i have a 1 problem: when i GET: "{ "quotes": [ { "0": 1, "1": "2017-04-03 23:23:04", "2": "2017-04-03 23:23:04", "3": "some content", "id": 1, "created_at": "2017-04-03 23:23:04", "updated_at": "2017-04-03 23:23:04", "content": "some content" } ]}"What is that? THANKS!
Abood Abu Salah
Guest
Abood Abu Salah
28 days 2 hours ago

hi max,is connecting laravel with angular 2 is same with ionic 2 ?

tech4afric
Guest
tech4afric
23 days 1 hour ago

yes, the process is the same

blocSonic
Guest
blocSonic
1 month 8 days ago

Thanks for this great tutorial. I have a concern regarding JS driven SPAs. How should we handle no JS? For accessibility reasons, I'd like to serve less dynamic content to anyone who lacks the JS (perhaps rendering views normally via laravel?). Any thoughts on that? An additional video for this series covering this concern would be great.

blocSonic
Guest
blocSonic
1 month 7 days ago
I think this attitude within the JS community is really flawed. 2% of all internet users is still around 56,000,000 people. There are very significant reasons for some people to browse the web without JS. To write them off like they don't matter is misguided, if all you're trying to do is save dev time. Those people should have access to your content, even if they can't access the more dynamic content on your site. In my case, I run a music label which features a site wide audio player, which requires it to be a single page app. There's… Read more »
Mindspace
Guest
Mindspace
1 month 7 days ago

You basically can't handle no-JS users. That's the simply truth. Use <noscript> to inform them about this fact but the alternative of building a complete fullstack app to fall back to is probably not worth the effort for ~2% of all users. If your page is heavily visited by people with no JS, you probably shouldn't create a SPA to begin with.

Евгений Дудник
Guest
Евгений Дудник
1 month 12 days ago

Thank you a lot for you work!! I want to ask you for a long time, why you don't use command line in your IDE?

Mindspace
Guest
Mindspace
1 month 12 days ago

Thanks so much! I actually do use it a lot in many of my videos :)I believe at the point of time of the recording of these videos there was a bug in the IDE leading to the command line not working correctly – that probably was the reason 🙂

Andrew Kudriavtsev
Guest
Andrew Kudriavtsev
1 month 17 days ago

Version of Laravel is 5.3

Meri
Guest
Meri
2 months 11 days ago

hello, i'm a newbie here, just started learning laravel & angular, i have a project where i have to create the backend with laravel and the front end with angular2, i'm trying to follow your video, but i don't have the folder "routes", i only have a file called routes found in app folder, is it because of the version? mine is 5.2. Should i use 5.3? Because i've been told that 5.2 is a better version. Thank you for your time

Ahmad rasheed
Guest
Ahmad rasheed
16 days 21 hours ago

yes, in newer version of Laravel, we have a route folder and a web file for managing routing inside it.

1 2 3 4
wpDiscuz