├── README.md ├── api ├── .editorconfig ├── .env.example ├── .gitattributes ├── .gitignore ├── .styleci.yml ├── README.md ├── app │ ├── Console │ │ └── Kernel.php │ ├── Exceptions │ │ └── Handler.php │ ├── Http │ │ ├── Controllers │ │ │ ├── Auth │ │ │ │ ├── ConfirmPasswordController.php │ │ │ │ ├── ForgotPasswordController.php │ │ │ │ ├── LoginController.php │ │ │ │ ├── RegisterController.php │ │ │ │ ├── ResetPasswordController.php │ │ │ │ └── VerificationController.php │ │ │ ├── Controller.php │ │ │ └── HomeController.php │ │ ├── Kernel.php │ │ └── Middleware │ │ │ ├── Authenticate.php │ │ │ ├── CheckForMaintenanceMode.php │ │ │ ├── EncryptCookies.php │ │ │ ├── RedirectIfAuthenticated.php │ │ │ ├── TrimStrings.php │ │ │ ├── TrustHosts.php │ │ │ ├── TrustProxies.php │ │ │ └── VerifyCsrfToken.php │ ├── Providers │ │ ├── AppServiceProvider.php │ │ ├── AuthServiceProvider.php │ │ ├── BroadcastServiceProvider.php │ │ ├── EventServiceProvider.php │ │ └── RouteServiceProvider.php │ └── User.php ├── artisan ├── bootstrap │ ├── app.php │ └── cache │ │ └── .gitignore ├── composer.json ├── composer.lock ├── config │ ├── app.php │ ├── auth.php │ ├── broadcasting.php │ ├── cache.php │ ├── cors.php │ ├── database.php │ ├── filesystems.php │ ├── hashing.php │ ├── logging.php │ ├── mail.php │ ├── queue.php │ ├── sanctum.php │ ├── services.php │ ├── session.php │ └── view.php ├── database │ ├── .gitignore │ ├── factories │ │ └── UserFactory.php │ ├── migrations │ │ ├── 2014_10_12_000000_create_users_table.php │ │ ├── 2014_10_12_100000_create_password_resets_table.php │ │ ├── 2019_08_19_000000_create_failed_jobs_table.php │ │ └── 2019_12_14_000001_create_personal_access_tokens_table.php │ └── seeds │ │ └── DatabaseSeeder.php ├── package.json ├── phpunit.xml ├── public │ ├── .htaccess │ ├── favicon.ico │ ├── index.php │ ├── robots.txt │ └── web.config ├── resources │ ├── js │ │ ├── app.js │ │ └── bootstrap.js │ ├── lang │ │ └── en │ │ │ ├── auth.php │ │ │ ├── pagination.php │ │ │ ├── passwords.php │ │ │ └── validation.php │ ├── sass │ │ └── app.scss │ └── views │ │ ├── auth │ │ ├── login.blade.php │ │ ├── passwords │ │ │ ├── confirm.blade.php │ │ │ ├── email.blade.php │ │ │ └── reset.blade.php │ │ ├── register.blade.php │ │ └── verify.blade.php │ │ ├── home.blade.php │ │ ├── layouts │ │ └── app.blade.php │ │ └── welcome.blade.php ├── routes │ ├── api.php │ ├── channels.php │ ├── console.php │ └── web.php ├── server.php ├── storage │ ├── app │ │ ├── .gitignore │ │ └── public │ │ │ └── .gitignore │ ├── framework │ │ ├── .gitignore │ │ ├── cache │ │ │ ├── .gitignore │ │ │ └── data │ │ │ │ └── .gitignore │ │ ├── sessions │ │ │ └── .gitignore │ │ ├── testing │ │ │ └── .gitignore │ │ └── views │ │ │ └── .gitignore │ └── logs │ │ └── .gitignore ├── tests │ ├── CreatesApplication.php │ ├── Feature │ │ └── ExampleTest.php │ ├── TestCase.php │ └── Unit │ │ └── ExampleTest.php ├── webpack.mix.js └── yarn.lock └── client ├── .editorconfig ├── .env.example ├── .gitignore ├── README.md ├── assets ├── README.md └── css │ └── tailwind.css ├── components ├── AccountDropdown.vue ├── Logo.vue ├── README.md └── app │ ├── Nav.vue │ └── PageHeader.vue ├── config └── tailwind.config.js ├── layouts ├── README.md ├── auth.vue └── default.vue ├── middleware └── README.md ├── nuxt.config.js ├── package-lock.json ├── package.json ├── pages ├── README.md ├── index.vue └── login.vue ├── plugins ├── README.md └── element-ui.js ├── static ├── README.md ├── favicon.ico ├── icon.png └── images │ └── avatar.jpeg ├── store └── README.md ├── tailwind.config.js └── yarn.lock /README.md: -------------------------------------------------------------------------------- 1 | # Laravel Nuxt Sanctum Starter 2 | 3 | Nuxt.js application which will demo the authentication flow using Laravel sanctum. 4 | 5 |  6 |  7 | 8 | ## Laravel .env 9 | ``` 10 | APP_URL=http://127.0.0.1 11 | SESSION_DOMAIN=127.0.0.1 12 | SANCTUM_STATEFUL_DOMAINS=127.0.0.1:3000 13 | ``` 14 | 15 | ## Nuxt .env 16 | ``` 17 | PORT=3000 18 | HOST=127.0.0.1 19 | BASE_URL=http://127.0.0.1:3000 20 | API_URL=http://127.0.0.1:8000 21 | ``` 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /api/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | insert_final_newline = true 7 | indent_style = space 8 | indent_size = 4 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [*.{yml,yaml}] 15 | indent_size = 2 16 | -------------------------------------------------------------------------------- /api/.env.example: -------------------------------------------------------------------------------- 1 | APP_NAME=Laravel 2 | APP_ENV=local 3 | APP_KEY=base64:zg9vWx+hwjBTljFMmbsci9+JgfPZxGZ4c0sQaGFpFxA= 4 | APP_DEBUG=true 5 | APP_URL=http://127.0.0.1 6 | 7 | LOG_CHANNEL=stack 8 | 9 | DB_CONNECTION=mysql 10 | DB_HOST=127.0.0.1 11 | DB_PORT=3306 12 | DB_DATABASE=laravel 13 | DB_USERNAME=root 14 | DB_PASSWORD= 15 | 16 | BROADCAST_DRIVER=log 17 | CACHE_DRIVER=file 18 | QUEUE_CONNECTION=sync 19 | SESSION_DRIVER=cookie 20 | SESSION_LIFETIME=120 21 | SESSION_DOMAIN=127.0.0.1 22 | SANCTUM_STATEFUL_DOMAINS=127.0.0.1:3000 23 | 24 | REDIS_HOST=127.0.0.1 25 | REDIS_PASSWORD=null 26 | REDIS_PORT=6379 27 | 28 | MAIL_MAILER=smtp 29 | MAIL_HOST=smtp.mailtrap.io 30 | MAIL_PORT=2525 31 | MAIL_USERNAME=null 32 | MAIL_PASSWORD=null 33 | MAIL_ENCRYPTION=null 34 | MAIL_FROM_ADDRESS=null 35 | MAIL_FROM_NAME="${APP_NAME}" 36 | 37 | AWS_ACCESS_KEY_ID= 38 | AWS_SECRET_ACCESS_KEY= 39 | AWS_DEFAULT_REGION=us-east-1 40 | AWS_BUCKET= 41 | 42 | PUSHER_APP_ID= 43 | PUSHER_APP_KEY= 44 | PUSHER_APP_SECRET= 45 | PUSHER_APP_CLUSTER=mt1 46 | 47 | MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" 48 | MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" 49 | -------------------------------------------------------------------------------- /api/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.css linguist-vendored 3 | *.scss linguist-vendored 4 | *.js linguist-vendored 5 | CHANGELOG.md export-ignore 6 | -------------------------------------------------------------------------------- /api/.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /public/hot 3 | /public/storage 4 | /storage/*.key 5 | /vendor 6 | .env 7 | .env.backup 8 | .phpunit.result.cache 9 | Homestead.json 10 | Homestead.yaml 11 | npm-debug.log 12 | yarn-error.log 13 | -------------------------------------------------------------------------------- /api/.styleci.yml: -------------------------------------------------------------------------------- 1 | php: 2 | preset: laravel 3 | disabled: 4 | - unused_use 5 | finder: 6 | not-name: 7 | - index.php 8 | - server.php 9 | js: 10 | finder: 11 | not-name: 12 | - webpack.mix.js 13 | css: true 14 | -------------------------------------------------------------------------------- /api/README.md: -------------------------------------------------------------------------------- 1 |