Search code examples
javascriptangularjslaravelngboilerplate

Combine Angular ngboilerplate and Laravel


I'm new to AngularJS specifically and Modern client-side development in general. And want to try implement Angular on my new project combine with Laravel framework. I'm interested in seed project for Angular called ngboilerplate.

I have looked into others opinion about how to integrate Angular and Laravel, and from what I learn, we should put all our angular on Laravel's public folder.

I need some feedback from you guys, what the best structure to combine these two framework? And I'm interesting to know how can we build this two framework together for deployment?


Solution

  • Since you are working with a PHP framework where (I assume) bootstrapping the application is done in the public folder.

    This is the folder where your angular (with ng-boilerplate) and laravel should meet so to speak.

    ng-boilerplate´s targeted folder of a build, out of the box, is dist and this target is what you would want to change without affecting the bootstrap process of laravel.

    My best advice is focus on the build process of the front-end (whether you use Grunt or gulp or broccoli or hell, rocking your own) and apply changes where it meets the needs of laravel, ng-boilerplate and your own.

    This will enforce you to learn what is maintainable and rethink how you build your application.


    note

    In case you come to state where you find this overwhelming, I recommend you to look into this project and go from there.


    Best of luck