Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Commit

Permalink
Updates to token_handler.blade.php to support Livewire 2.x (#1247)
Browse files Browse the repository at this point in the history
  • Loading branch information
unplugged216 authored Nov 1, 2022
1 parent 7d27600 commit 31ff8ea
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/resources/views/partials/token_handler.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@
window.jQuery.ajaxSettings.headers = { 'Authorization': bearer };
}
}
if (window.Livewire) {
// livewire
window.livewire.addHeaders({
'Authorization': bearer,
'content-type': 'application/json',
'X-Requested-With': 'XMLHttpRequest'
});
}
if (window.axios) {
// Axios
Expand Down

0 comments on commit 31ff8ea

Please sign in to comment.