A Laravel-Vue SPA starter kit.

Overview

Laravel-Vue SPA

Build Status Total Downloads Latest Stable Version

A Laravel-Vue SPA starter kit.

Features

  • Laravel 8
  • Vue + VueRouter + Vuex + VueI18n + ESlint
  • Pages with dynamic import and custom layouts
  • Login, register, email verification and password reset
  • Authentication with JWT
  • Socialite integration
  • Bootstrap 5 + Font Awesome 5

Installation

  • composer create-project --prefer-dist cretueusebiu/laravel-vue-spa
  • Edit .env and set your database connection details
  • (When installed via git clone or download, run php artisan key:generate and php artisan jwt:secret)
  • php artisan migrate
  • npm install

Usage

Development

npm run dev

Production

npm run build

Socialite

This project comes with GitHub as an example for Laravel Socialite.

To enable the provider create a new GitHub application and use https://example.com/api/oauth/github/callback as the Authorization callback URL.

Edit .env and set GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET with the keys form your GitHub application.

For other providers you may need to set the appropriate keys in config/services.php and redirect url in OAuthController.php.

Email Verification

To enable email verification make sure that your App\User model implements the Illuminate\Contracts\Auth\MustVerifyEmail contract.

Testing

# Run unit and feature tests
vendor/bin/phpunit

# Run Dusk browser tests
php artisan dusk

Changelog

Please see CHANGELOG for more information what has changed recently.

Comments
  • npm run dev doesn't work after npm update

    npm run dev doesn't work after npm update

    after clean install if you just run npm install and npm audit fix everything works but if you run update then it stops working. npm run dev stopped working altogether, with a errors i am not capable of understanding yet, and npm run watch and npm run hot also seem to have some problem as it doesn't seem to reflect any changes even if the compilation seems to be completed.

    I am new to programming and i am probablly not capable of finding the problem so can someone please point out what the problem is here.....

    TypeError: Cannot read property 'length' of undefined at C:\Users\iteni\Desktop\Sites\laravel-vue-spa\node_modules\laravel-mix-versionhash\src\index.js:145:42 at C:\Users\iteni\Desktop\Sites\laravel-vue-spa\node_modules\laravel-mix\src\Dispatcher.js:34:47 at Array.forEach () at Dispatcher.fire (C:\Users\iteni\Desktop\Sites\laravel-vue-spa\node_modules\laravel-mix\src\Dispatcher.js:34:28) at Mix.dispatch (C:\Users\iteni\Desktop\Sites\laravel-vue-spa\node_modules\laravel-mix\src\Mix.js:118:25) at C:\Users\iteni\Desktop\Sites\laravel-vue-spa\node_modules\laravel-mix\src\builder\webpack-plugins.js:43:46 at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\Users\iteni\Desktop\Sites\laravel-vue-spa\node_modules\tapable\lib\HookCodeFactory.js:33:10), :25:1) at AsyncSeriesHook.lazyCompileHook (C:\Users\iteni\Desktop\Sites\laravel-vue-spa\node_modules\tapable\lib\Hook.js:154:20)
    at C:\Users\iteni\Desktop\Sites\laravel-vue-spa\node_modules\webpack\lib\Compiler.js:304:22 at Compiler.emitRecords (C:\Users\iteni\Desktop\Sites\laravel-vue-spa\node_modules\webpack\lib\Compiler.js:499:39) at C:\Users\iteni\Desktop\Sites\laravel-vue-spa\node_modules\webpack\lib\Compiler.js:298:10 at C:\Users\iteni\Desktop\Sites\laravel-vue-spa\node_modules\webpack\lib\Compiler.js:485:14 at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\Users\iteni\Desktop\Sites\laravel-vue-spa\node_modules\tapable\lib\HookCodeFactory.js:33:10), :18:1) at AsyncSeriesHook.lazyCompileHook (C:\Users\iteni\Desktop\Sites\laravel-vue-spa\node_modules\tapable\lib\Hook.js:154:20)
    at C:\Users\iteni\Desktop\Sites\laravel-vue-spa\node_modules\webpack\lib\Compiler.js:482:27 at C:\Users\iteni\Desktop\Sites\laravel-vue-spa\node_modules\neo-async\async.js:2818:7 at done (C:\Users\iteni\Desktop\Sites\laravel-vue-spa\node_modules\neo-async\async.js:3522:9) at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\Users\iteni\Desktop\Sites\laravel-vue-spa\node_modules\tapable\lib\HookCodeFactory.js:33:10), :4:1) at C:\Users\iteni\Desktop\Sites\laravel-vue-spa\node_modules\webpack\lib\Compiler.js:464:33 at C:\Users\iteni\Desktop\Sites\laravel-vue-spa\node_modules\graceful-fs\graceful-fs.js:57:14 at FSReqCallback.oncomplete (fs.js:146:23) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @ development: cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @ development script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

    npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\iteni\AppData\Roaming\npm-cache_logs\2020-01-02T12_22_21_700Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @ dev: npm run development npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @ dev script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

    npm ERR! A complete log of this run can be found in: at C:\Users\iteni\Desktop\Sites\laravel-vue-spa\node_modules\webpack\lib\Compiler.js:464:33 at C:\Users\iteni\Desktop\Sites\laravel-vue-spa\node_modules\graceful-fs\graceful-fs.js:57:14 at FSReqCallback.oncomplete (fs.js:146:23) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @ development: cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @ development script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

    npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\iteni\AppData\Roaming\npm-cache_logs\2020-01-02T12_22_21_700Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @ dev: npm run development npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @ dev script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

    npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\user\AppData\Roaming\npm-cache_logs\2020-01-02T12_22_21_922Z-debug.log

    2020-01-02T12_22_21_922Z-debug.log

    BTW everything is working as long as i dont update npm so i am doing just that, but i still wanna know why it breaks after npm update...

    opened by iteniasim 15
  • One CLI for webpack must be installed. These are recommended choices, delivered as separate packages

    One CLI for webpack must be installed. These are recommended choices, delivered as separate packages

    captura

    One CLI for webpack must be installed. These are recommended choices, delivered as separate packages:

    • webpack-cli (https://github.com/webpack/webpack-cli) The original webpack full-featured CLI.
    • webpack-command (https://github.com/webpack-contrib/webpack-command) A lightweight, opinionated webpack CLI. We will use "yarn" to install the CLI via "yarn add -D". Which one do you like to install (webpack-cli/webpack-command):
    opened by ivanjj22 15
  • Multiple enhancements and fixes / Repair and speeding up Travis CI builds

    Multiple enhancements and fixes / Repair and speeding up Travis CI builds

    • [x] Updated sweetalert2 from ^7.19.3 to ^8.10.0
    • [x] Updated vue-router, vue-i18n, jquery, sass, eslint-plugin-import, eslint-plugin-node
    • [x] Forced Laravel Dusk to use latest stable Chrome driver release (it was one of many reasons why Travis CI failing tests)
    • [x] Enhanced Travis CI config - caching composer and npm, selfupdating composer, nodejs & npm to latest stable release during build, speeding up
    • [x] Improved Laravel Dusk tests (fixed no such element: Unable to locate element and element not interactable)
    • [x] Temporary disabled mix.extract(), because it's buggy with Webpack code-splitting/chunking mechanism (dynamic imports), see commit addf76d and related issue https://github.com/JeffreyWay/laravel-mix/issues/1889
    • [x] Refactored routes file & fixed bugs of Laravel Mix 4 in webpack.mix.js file
    • [x] Made HMR mode work great again, fixes #163
    • [x] Regenerated composer.lock for freshness
    opened by TemaSM 14
  • Webpack 4  - Npm run dev error

    Webpack 4 - Npm run dev error

    Npm run dev/watch or build process error

    dep.getResourceIdentifier is not a function

    node -v v10.8.0 npm -v 6.2.0

    error details clone repo npm i npm i webpack-cli npm run dev This Error :

    image

    opened by yusufdemir 10
  • i18n lang json vs. js

    i18n lang json vs. js

    Thanks for this cool setup!

    When I run this, my code looks for en.js instead of en.json. So I have added .json to the import in plugins/i18n.js, but with the webpack configuration it will not find it because of the hash.

    What am I doing wrong? Thanks in advance.

    opened by molerat619 9
  • Unexpected token

    Unexpected token

    Hi, I'm getting an "unexpected token" error when I run "npm run watch"

    The error:

     ERROR  Failed to compile with 2 errors                                                                         11:02:35
    
     error  in ./resources/assets/js/plugins/i18n.js
    
    Syntax Error: Unexpected token (17:27)
    
      15 | export async function loadMessages (locale) {
      16 |   if (Object.keys(i18n.getLocaleMessage(locale)).length === 0) {
    > 17 |     const messages = await import(/* webpackChunkName: "lang-[request]" */ `~/lang/${locale}`)
         |                            ^
      18 |     i18n.setLocaleMessage(locale, messages)
      19 |   }
      20 |
    
    
    
     @ ./resources/assets/js/app.js 6:0-34
     @ multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss
    
     error  in ./resources/assets/js/router/routes.js
    
    Syntax Error: Unexpected token (1:22)
    
    > 1 | const Welcome = () => import('~/pages/welcome')
        |                       ^
      2 | const Login = () => import('~/pages/auth/login')
      3 | const Register = () => import('~/pages/auth/register')
      4 | const PasswordEmail = () => import('~/pages/auth/password/email')
    
    
    
     @ ./resources/assets/js/router/index.js 201:0-30
     @ ./resources/assets/js/app.js
     @ multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss
                                                                                                                      Asset     Size  Chunks                    Chunk Names
      \js\app.js  4.86 MB       0  [emitted]  [big]  \js\app
    \css\app.css  1.79 MB       0  [emitted]  [big]  \js\app
    
    ERROR in ./resources/assets/js/plugins/i18n.js
    Module build failed: SyntaxError: C:/xampp/htdocs/overhoor/resources/assets/js/plugins/i18n.js: Unexpected token (17:27)
    
      15 | export async function loadMessages (locale) {
      16 |   if (Object.keys(i18n.getLocaleMessage(locale)).length === 0) {
    > 17 |     const messages = await import(/* webpackChunkName: "lang-[request]" */ `~/lang/${locale}`)
         |                            ^
      18 |     i18n.setLocaleMessage(locale, messages)
      19 |   }
      20 |
    
     @ ./resources/assets/js/app.js 6:0-34
     @ multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss
    
    ERROR in ./resources/assets/js/router/routes.js
    Module build failed: SyntaxError: C:/xampp/htdocs/overhoor/resources/assets/js/router/routes.js: Unexpected token (1:22)
    
    > 1 | const Welcome = () => import('~/pages/welcome')
        |                       ^
      2 | const Login = () => import('~/pages/auth/login')
      3 | const Register = () => import('~/pages/auth/register')
      4 | const PasswordEmail = () => import('~/pages/auth/password/email')
    
     @ ./resources/assets/js/router/index.js 201:0-30
     @ ./resources/assets/js/app.js
     @ multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss
    
    opened by Sjoerd 9
  • Navigation between long pages issue

    Navigation between long pages issue

    When navigating between pages within the same layout (Or not) there is a behavior that is not very much user friendly in my view.

    For example if is there a route-link in the middle/bottom of the page upon click the page goes to top very fast and then is showed the new page. Its kind of annoying :/

    Is there any way to fix this ?

    Example: image

    opened by this-user-name 8
  • Hmmm, - an issue :)

    Hmmm, - an issue :)

    Hi! I like your job! But.

    • how to fast fix localhost:8080 error, if im behind NAT and TWO proxying web-servers ?

    it is possible to use FQDN on port 80 ? And how (im stuck).

    opened by h-zone 8
  • update jwt to laravel sanctum

    update jwt to laravel sanctum

    update jwt to laravel sanctum also you can remove "tymon/jwt-auth": "^1.0.0" and remove "fruitcake/laravel-cors": "^1.0", instance you official way in laravel 7

    enhancement 
    opened by vahidalvandi 7
  • Allow middleware to accept parameters

    Allow middleware to accept parameters

    PR for code in issue #124 ... @cretueusebiu I notice this change hasn't been included yet, so I've created this PR for you to help with the process. This is just @imade-nl 's code form the ticket with a little additional documentation.

    opened by jimohalloran 7
  • How to re enable csrf ?

    How to re enable csrf ?

    How can i re enable csrf ?

    I already uncommented the lines in the App\Http\Kernel but I still can make post requests with postman without the csrf field in the header.

    opened by bmpf 7
  • asyncData function only works once

    asyncData function only works once

    Function asyncData only works once.

    When the route is loaded for the first time component.data function set data on component. If you reload the route function assignment to component.date does not occur and the component contains the data loaded when the route was first loaded.

    opened by AndySHLab 0
  • Anything on Laravel 9 and PHP 8 support?

    Anything on Laravel 9 and PHP 8 support?

      Problem 1
        - nette/schema is locked to version v1.2.1 and an update of this package was not requested.
        - nette/schema v1.2.1 requires php >=7.1 <8.1 -> your php version (8.1.2) does not satisfy that requirement.
      Problem 2
        - nette/utils is locked to version v3.2.2 and an update of this package was not requested.
        - nette/utils v3.2.2 requires php >=7.2 <8.1 -> your php version (8.1.2) does not satisfy that requirement.
      Problem 3
        - phpspec/prophecy is locked to version 1.13.0 and an update of this package was not requested.
        - phpspec/prophecy 1.13.0 requires php ^7.2 || ~8.0, <8.1 -> your php version (8.1.2) does not satisfy that requirement.
      Problem 4
        - nette/schema v1.2.1 requires php >=7.1 <8.1 -> your php version (8.1.2) does not satisfy that requirement.
        - league/config v1.1.1 requires nette/schema ^1.2 -> satisfiable by nette/schema[v1.2.1].
        - league/config is locked to version v1.1.1 and an update of this package was not requested.
    
    opened by iammuttaqi 0
  • when we run

    when we run "npm run dev" its shows Can't resolve '~/store'

    I'm deploying my project on AWS EC2 instance ubuntu 18.8 where I'm getting this error when I run the command to create production build.

    npm run dev

    ERROR in ./resources/js/Components/App.vue?vue&type=script&lang=js& (./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/Components/App.vue?vue&type=script&lang=js&) 25:21-68
    Module not found: Error: Can't resolve '~/layouts' in '/var/www/html/rapid-remit-laravel/resources/js/Components'
    
    ERROR in ./resources/js/Middleware/admin.js 1:0-28
    Module not found: Error: Can't resolve '~/store' in '/var/www/html/rapid-remit-laravel/resources/js/Middleware'
    
    ERROR in ./resources/js/Middleware/auth.js 7:0-28
    Module not found: Error: Can't resolve '~/store' in '/var/www/html/rapid-remit-laravel/resources/js/Middleware'
    
    ERROR in ./resources/js/Middleware/check-auth.js 7:0-28
    Module not found: Error: Can't resolve '~/store' in '/var/www/html/rapid-remit-laravel/resources/js/Middleware'
    
    ERROR in ./resources/js/Middleware/guest.js 1:0-28
    Module not found: Error: Can't resolve '~/store' in '/var/www/html/rapid-remit-laravel/resources/js/Middleware'
    
    ERROR in ./resources/js/Middleware/locale.js 7:0-28
    Module not found: Error: Can't resolve '~/store' in '/var/www/html/rapid-remit-laravel/resources/js/Middleware'
    
    ERROR in ./resources/js/Middleware/role.js 1:0-28
    Module not found: Error: Can't resolve '~/store' in '/var/www/html/rapid-remit-laravel/resources/js/Middleware'
    
    webpack compiled with 7 errors
    
    
    opened by shahrukh-planet01 0
  • If you refresh the page multiple times, it logs you out

    If you refresh the page multiple times, it logs you out

    Hello,

    I notice when I refresh the website multiple times, it logs the user out.

    For example when "User A" is logged in and clicks "refresh" 5-6 times very quickly, site logs out the user. And the "login" re-appears where the user can login again.

    Does anyone know why this happen?

    Thank you

    opened by shieldcy 0
Releases(6.0.1)
A starter kit that integrates Laravel with Vue CLI, Inertia.js, TailwindCSS and Vuetify

Laravel Viltify Laravel Viltify is a heavily opinionated Laravel starter kit. It's intent is to seamlessly integrate V ue, I nertia.js, L aravel, T ai

Matheus Dal'Pizzol 50 Jan 4, 2023
It's a dashboard theme/UI-Starter Kit with Laravel, Inertia and Vue (JetStream).

TailAdmin Inertia It's a dashboard theme/UI-Starter Kit with Laravel, Inertia and Vue (JetStream). Setup Directions npm install composer install Chang

Sinan AYDOĞAN 121 Dec 31, 2022
Laravel Vue SPA, Bulma themed. For demo login use `[email protected]` & `password` -

Laravel Enso Hit the ground running when building your new Laravel SPA project with boilerplate and extra functionality out of the box! click on the p

Laravel Enso 1k Jan 3, 2023
Laravel Vue SPA, Bulma themed. For demo login use `[email protected]` & `password` -

Laravel Enso Hit the ground running when building your new Laravel SPA project with boilerplate and extra functionality out of the box! click on the p

Laravel Enso 1k Jan 3, 2023
A Laravel 9, Vite, Svelte SPA, Tailwind CSS (w/ Forms Plugin & Aspect Ratio Plugin), Axios & TypeScript starter template.

Laravel 9 + Vite + Svelte + Tailwind CSS This starter template includes: Laravel 9 Vite Svelte Tailwind CSS (w/ @tailwindcss/forms and @tailwindcss/as

Ronnie 19 Dec 20, 2022
:elephant: A Laravel 6 SPA boilerplate with a users CRUD using Vue.js 2.6, GraphQL, Bootstrap 4, TypeScript, Sass, and Pug.

Laravel Vue Boilerplate A Laravel 6 Single Page Application boilerplate using Vue.js 2.6, GraphQL, Bootstrap 4, TypeScript, Sass and Pug with: A users

Alefe Souza 533 Jan 3, 2023
A Laravel 8 and Vue 3 SPA boilerplate using tailwind styling and sanctum for authentication :ghost:

Laravel Vue Sanctum SPA Laravel and vue spa using tailwind (laravel/ui looks) for styling and sanctum for authentification Features Laravel 8 Vue + Vu

Hijen EL Khalifi 62 Dec 5, 2022
A Laravel Starter Kit for Laravel. Built with Laravel 8.

Laravel Get Started Project Laravel Get Started Project is a basic crud app built with laravel 8. In this app a basic product crud created. Features i

Nazmul Hasan Robin 8 Nov 24, 2022
React laravel starter kit with tailwind css and vite js(laravel 9)

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Jerald Tonmoy Dias 2 Dec 23, 2022
Laravel API starter Kit will provide you with the tools for making API's that everyone will love

Laravel API Starter Kit Laravel API starter Kit will provide you with the tools for making API's that everyone will love, API Authentication is alread

Jose Luis Fonseca 400 Dec 29, 2022
Laravel + Livewire + Bootstrap 5 UI starter kit.

bastinald/ui Laravel + Livewire + Bootstrap 5 UI starter kit. Requirements Laravel 8 NPM Features Bootstrap 5 pre-configured Textarea autosize Floatin

null 83 Dec 26, 2022
a free, open-source dashboard panel starter kit for Laravel

QAdmin a free, open-source dashboard panel starter kit for Laravel. Just intall and everything is ready Tech Stack Client: ruangAdmin, Bootstrap, Jque

null 30 Oct 11, 2022
A simple starter kit for using TypedCMS with the Laravel framework.

TypedCMS Starter Kit for Laravel Our stater kits are tailored solutions for each platform, unlike the simple API wrappers offered by other vendors. Th

TypedCMS 1 Nov 20, 2021
Laravel React Webpack Starter Kit

About Laravel Laravel React Webpack Starter Kit This starter kit is designed to get you up and running with with react.js with Laravel, built on top o

Biju Nakarmi 32 Nov 24, 2022
👔 Enterprise Web application starter kit or template using Laravel

Laravel Enterprise Starter Kit (LESK) Description LESK, is a template project based on the Laravel LTS, combining a set of features that can kick star

Sebastien Routier 1 Dec 31, 2020
A Laravel-Nuxt starter kit.

Laravel-Nuxt A Laravel-Nuxt starter project template. Features Nuxt 2 Laravel 8 SPA or SSR Socialite integration VueI18n + ESlint + Bootstrap 4 + Font

Cretu Eusebiu 1.1k Jan 5, 2023
An administration starter kit for Laravel.

Craftable About Demo Packages used Requirements Installation New project Add to existing project Basics Documentation Where to go next? About Hi Craft

BRACKETS 862 Jan 4, 2023
Laravel Boilerplate / Starter Kit with Gentelella Admin Theme

Laravel Boilerplate Project Laravel Boilerplate provides a very flexible and extensible way of building your custom Laravel applications. Table of Con

Labs64 848 Dec 28, 2022
An implementing of the Laravel Breeze application / authentication starter kit frontend in Next.js

Windmill with Laravel Breeze as Backend API Introduction This repository is an implementing of the Laravel Breeze application / authentication starter

ROKET ID 17 Nov 18, 2022