Git Product home page Git Product logo

vue_laravel_starter_template's Introduction

Vue + Laravel 7

Starter template Vue + Laravel 7

Getting Started

Follow all the steps in order to start the project

Installing

Install composer dependecies

composer install

Install npm packages

npm i

Config your database in

.env

Run migrations

php artisan migrate

Generate passport keys

php artisan passport:install

Add to .env your passport keys

PASSPORT_LOGIN_ENDPOINT=http://domain.com/oauth/token
PASSPORT_CLIENT_ID=2
PASSPORT_CLIENT_SECRET=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

You can see all you routes executing

php artisan route:list

Generate User

Run tinker

php artisan tinker

Execute factory

factory('App\User')->create()

You result should be something like this

=> App\User {#3052
     name: "Ohara Jared",
     email: "[email protected]",
     email_verified_at: "2019-10-07 19:18:24",
     updated_at: "2019-10-07 19:18:24",
     created_at: "2019-10-07 19:18:24",
     id: 1,
   }

Test

We will use Postman to make the test, we will make a POST request to http://domain.com/api/login just sending the username and password fields of the user we want to authenticate. In body we select form-data and add

username: [email protected]
password: password

Should return something like this

{"token_type":"Bearer","expires_in":31536000,"access_token":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"}

vue_laravel_starter_template's People

Contributors

cierczek avatar dependabot[bot] avatar

Watchers

James Cloos avatar  avatar

Forkers

pawel0804

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.