GithubHelp home page GithubHelp logo

hhy5277 / starter-laravel-angular Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zemke/starter-laravel-angular

0.0 1.0 0.0 906 KB

Laravel and AngularJS Starter Application Boilerplate featuring Laravel 5.3 and AngularJS 1.5.8

Home Page: https://starter-laravel-angular.herokuapp.com

License: Other

PHP 80.27% JavaScript 6.71% CSS 0.16% HTML 9.44% Hack 3.43%

starter-laravel-angular's Introduction

💁 Zemke/starter-laravel-angular has been upgraded to AngularJS 1.5.8.

💁 Zemke/starter-laravel-angular has been upgraded to Laravel 5.3. You can pull the changes and run rm composer.lock && composer install --prefer-dist --no-scripts to merge the upgrade.

Laravel and AngularJS Starter Application

This is a repo for a starter application for a Single Page Application featuring the modern Laravel PHP framework and Google’s acclaimed front-end framework AngularJS. Just download and install and you have a good foundation for building any application.

Features!

  • Single Page Application
    • HTML5 mode URLs
    • Optimized Laravel and AngularJS routes
      • You kind of don’t need to care about routes, they work automatically as you add new views. Still allows for flexibility if you plan any special routes.
  • Authentication!
  • Laravel Elixir readily configured
    • Versioning of CSS and JS files (cache busting)
    • CSS and JS files will be included automatically
  • A whole ready CRUD architecture
  • Comes with Bootstrap and AngularJS configured to work together at their best
  • And more... have a try!

Installation

git clone https://github.com/Zemke/starter-laravel-angular.git
composer install --prefer-dist
npm install

Database setup

Edit .env.example according to your environment and save as .env. An application key can be generates with the command php artisan key:generate.

Run these commands to create the tables within the database you have already created.

php artisan migrate:install
php artisan migrate:refresh

If you get an error like a PDOException try editing your .env file and change DB_HOST=localhost to DB_HOST=127.0.0.1. If that doesn’t work, file an issue on GitHub, I will be glad to help. Source: http://stackoverflow.com/a/20733001

Run

To provide the JS and CSS files and to keep track of changes to these files:

gulp && gulp watch

To start the PHP built-in server:

php -S localhost:8080 -t public/

Now you can browse the site http://localhost:8080. 🙌

Requirements

  • PHP >= 5.4
  • Composer
  • Gulp
  • NPM
  • MySQL

Heroku deployment

Unignore some files

You should remove .env and composer.lock from .gitignore.

.env

Set up your .env file like described in “Database setup” above.

Heroku buildpacks

You will need to add custom buildpacks for Heroku. Create .buildpacks and paste:

https://github.com/heroku/heroku-buildpack-php
https://github.com/heroku/heroku-buildpack-nodejs

Procfile

web: vendor/bin/heroku-php-apache2 public/

NPM config

Your package.json should be changed to this:

{
    "private": true,
    "devDependencies": {
        "gulp": "^3.8.8"
    },
    "dependencies": {
        "laravel-elixir": "^3.0.0",
        "gulp": "^3.8.8"
    },
    "scripts": {
        "postinstall": "gulp"
    }
}

The scripts postinstall part is the important here, this will generate the resources like JS and CSS files.

Have fun! Any feedback is welcome. Use Issues or Twitter. My Twitter handle is @FlorianZemke. I’m looking forward to talk to you.

Laravel AngularJS

starter-laravel-angular's People

Contributors

emmanuelgautier avatar fortis avatar seanmartinlewis avatar unicodeveloper avatar zemke avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.