Giter VIP home page Giter VIP logo

laravel-vue-spa's Introduction

Laravel-Vue-SPA

This repository is the result of a tutorial about creating a SPA (Single Page Application) with role-based authentication with Laravel and Vue.

This tutorial is available here (version française ici).

Update Laravel 6

The project has been updated for Laravel 6. Just switch to the 'Laravel-6.1' branch.

Prerequiries

  • PHP 7
  • Composer
  • NodeJs
  • MySQL

Installation

  • Clone the repository
  • Installer back dependencies with composer install
  • Install front dependencies with npm i
  • Copy file .env.example in .env and add following informations:
    • Database credentials (DB_HOST, DB_PORT, ...)
    • Application url (APP_URL). Either virtual host address if you configure one, either address form the command php artisan serve
  • Generate application key with php artisan key:generate
  • Generate JWT key with php artisan jwt:secret
  • Launch migrations with php artisan migrate --seed.
  • Build front with npm run dev

If you did'nt set a virtual host, launch application with the php artisan serve command. By default, application will be served at http://127.0.0.1:8000

Configuration

You can change the length of time (in minutes) that the token will be valid for by changin the JWT_TTL value in the .env file.

Usage

Log as admin with [email protected]:admin or as user with [email protected]:secret

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.