Skip to content

Instantly share code, notes, and snippets.

View pabloweinx's full-sized avatar

Pablo García pabloweinx

  • Joinup Green Intelligence
  • Seville, Spain
View GitHub Profile
@hotmeteor
hotmeteor / README.md
Last active May 25, 2017 16:29 — forked from niallobrien/gist:ea2bb9b7a62d7bccd09f
Laravel + Angular + Gulp

Laravel & Angular

Overview

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.

Server

App::before(function($request)
{
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, POST, OPTIONS');
header('Access-Control-Allow-Headers: Origin, Content-Type, Accept, Authorization, X-Request-With');
header('Access-Control-Allow-Credentials: true');
});
@kentcdodds
kentcdodds / README.md
Last active July 29, 2017 15:37
upload-file

upload-file angular-formly type

This is my upload-file type for what I use at work. We use angular-upload for the upload service to do the actual file uploading. We also have several abstractions and use ES6 that may confuse you a little bit (sorry about that). Hopefully this gets you started though.