- Create a middleware
php artisan make:middleware AjaxSessionExpiredMiddleware
- Open the
AjaxSessionExpiredMiddleware
and add following code:
<?php
// The Vue build version to load with the `import` command | |
// (runtime-only or standalone) has been set in webpack.base.conf with an alias. | |
import Vue from 'vue' | |
import App from './App' | |
import VeeValidator, { Validator } from 'vee-validate' | |
import CpfValidator from './components/validators/cpf.validator' | |
import Dictionary from './components/validators/dictionary' | |
import Produto from './components/produtos.vue' | |
Validator.extend('cpf', CpfValidator) |