Giter VIP home page Giter VIP logo

laravel-angular-boilerplate's Introduction

Laravel + Angular Logo

Laravel + Angular Boilerplate

Quick start for Laravel 5.6 + Angular 6.0 projects with JWT auth.

Includes:

Front-end:

  • Angular CLI boilerplate files
  • JWT authentication service
  • Login/Register components (Angular Material)
  • Password reset components

Back-end:

  • Composer build file
  • Boilerplate files
  • JWT authentication
  • Password reset functionality

Server

  • Install PHP and one of the following Databases: MySQL, PostgreSQL, MS SQL Server or SQL Lite.
  • Install Composer and nodeJS.
  • Go to Server folder and run composer install to install dependencies.
  • Set your DB connections in .env: DB_CONNECTION (mysql, pgsql, sqlsrv, sqlite), DB_DATABASE, DB_PORT, DB_USERNAME, DB_PASSWORD. For email sending make sure that you have in your .env file next keys set: MAIL_DRIVER, MAIL_HOST, MAIL_PORT, MAIL_USERNAME, MAIL_PASSWORD, MAIL_ENCRYPTION. Fou production build change environment to production: APP_ENV=production.
  • To update your DB to current version go to Server folder and run php artisan migrate. If you want to rollback old migration use php artisan migrate:rollback.
  • (optional) If you want to change APP_KEY run php artisan key:generate to generate app key. If you get any error on key generation, check if line APP_KEY= exists in .env, then rerun command. Make sure that apache has access to write into Server/bootstrap/cache and Server/storage folders.
  • (optional) If you want to change JWT secret run php artisan jwt:generate to generate secret for API.

Client

  • Install nodeJS
  • Globally install Angular CLI using command npm install -g @angular/cli@latest
  • Open Client folder in terminal/console and run npm i to install all dependencies
  • Add URL to your local server to /Client/src/environments/environment.ts
  • Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
  • If you want to generate a new component run ng generate component component-name. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.
  • Run ng build -prod in Client directory to build angular client. The build artifacts will be stored in the dist/ directory.

Screenshot

License: MIT

laravel-angular-boilerplate's People

Contributors

odonata95 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.