Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

laravel 5.6 with angular 6 integration

I want to use laravel(as backend) and angular(as frontend). As far as I know I can use 2 methods :-

1) I can integrate both frameworks by using API service or

2) I can use monolithic architecture style (using angular with blade template)

As per my requirements 2nd option is better because in it I can use laravel's default functionalities in angular like (Auth, user roles and permissions etc).

But I afraid that 2nd option makes the project complex and messy in future.

which is the better option?

like image 931
Ankit24007 Avatar asked Jul 02 '18 07:07

Ankit24007


1 Answers

I have used myself Laravel with Angular v2+, the way I did was to make two separate projects, one which creates the API's (The Laravel app) and one which consumes the API's (Angular v6 app). That is how it is meant to work and that is how you should approach it. If you want to integrate the front with the back end, and still have a powerful SPA, then you can go with VueJS, there are vast resources when it comes to the Laravel Vue combination.

like image 200
Leandrit Ferizi Avatar answered Oct 13 '22 19:10

Leandrit Ferizi