ACL issue fixed

This commit is contained in:
jitendra 2018-12-04 09:56:15 +05:30
parent 8ae76038fc
commit f75cfe66fc
4 changed files with 16 additions and 13 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
{ {
"/js/admin.js": "/js/admin.js?id=463fcd59d49e91caa65c", "/js/admin.js": "/js/admin.js?id=1d3c0ea423bffae501e9",
"/css/admin.css": "/css/admin.css?id=201f91bc553baa11139f" "/css/admin.css": "/css/admin.css?id=201f91bc553baa11139f"
} }

View File

@ -1,15 +1,17 @@
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; if (window.axios) {
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
/** /**
* Next we will register the CSRF Token as a common header with Axios so that * Next we will register the CSRF Token as a common header with Axios so that
* all outgoing HTTP requests automatically have it attached. This is just * all outgoing HTTP requests automatically have it attached. This is just
* a simple convenience so we don't have to attach every token manually. * a simple convenience so we don't have to attach every token manually.
*/ */
let token = document.head.querySelector('meta[name="csrf-token"]'); let token = document.head.querySelector('meta[name="csrf-token"]');
if (token) { if (token) {
window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content; window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
} else { } else {
console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token'); console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
}
} }

View File

@ -4,6 +4,7 @@ namespace Webkul\User\Http\Middleware;
use Closure; use Closure;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Route;
class Bouncer class Bouncer
{ {