This is an upgraded and modified version of ordigital/laravel-nuxt-bs with Laravel 8, Sanctum SPA Auth and Fortify.
It use nuxtjs/auth Sanctum provider to log in users.
Features:
- Laravel 8
- NuxtJS
- Sanctum SPA Auth
- Fortify
- Nuxt Laravel Integration m2s/laravel-nuxt
- BootstrapVue
- DotEnv
- ESLint + VSCode support
- Jest
- Clone repository:
$ git clone https://github.com/frizikk/laravel-nuxtjs-sanctum-fortify your-project
$ cd your-project
- Run auto-setup:
$ ./setup.sh
…which just executes commands below:
$ npm install # installs npm modules
$ npm audit fix # fixes to npm
$ composer install # installs composer modules
$ php artisan key:generate # generates app key in .env
$ touch database/database.sqlite # creates sqlite database
$ php artisan migrate:fresh --seed # migrates and seeds database with example user
- Edit
.env
and change:
APP_NAME="Name of your app"
APP_DESC="Description of your app"
APP_URL=https://localhost:8000
DEV_URL=https://localhost:3000 # axios baseURL for development
LARAVEL_DEV_URL=https://localhost:3001 # axios baseURL for development
- You can edit NuxtJS config in
nuxt.config.js
and NuxtJS project inresources/nuxt
- Run developement server:
$ npm run dev
- Open website and try to sign in as
[email protected]
using passwordlucky
- To build for production:
$ npm run build
$ php artisan serve