This setup involves creating a Laravel API and an Angular client-app with Gulp covering the asset pipeline.
Our Laravel API server will serve one view only and that is to simply load the Angular app.
First, create a new directory for your project. We're going to place the server and client directories in here. You'll need to install Laravel, Yeoman, generator-gulp-angular and any other dependencies.
mkdir exampleApp && $_
laravel new server
Open exampleApp/server/app/routes.php and change return View::make('hello'); to return View::make('index');
For the client, run Yeoman to setup the app. We'll replace the build task to suit Laravel's setup.
mkdir client && $_
yo gulp-angular client
Before running any Gulp tasks, let's replace gulp-ruby-sass with gulp-sass. Gulp-sass is faster. We'll also need gulp-rename and gulp-notify.
npm install gulp-sass gulp-rename gulp-notify --save-dev
After you've run the generator and selected your preferred modules etc., replace exampleApp/client/gulp/build.js with the file provided below. The gulp build task will output all assets into exampleApp/server/public/ and output the html file as exampleApp/server/app/views/index.blade.php all setup to load your Angular app.
gulporgulp buildto build an optimized version of your application in /server/public. The index file is placed in /server/app/views/ as index.blade.htmlgulp serveto launch a browser sync server on your source filesgulp serve:distto launch a server on your optimized applicationgulp wiredepto fill bower dependencies in your .html file(s)gulp testto launch your unit tests with Karmagulp protractorto launch your e2e tests with Protractorgulp protractor:distto launch your e2e tests with Protractor on the dist files
hi , can you please attach your bower.json and package.json file ?
thanks