This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script data-turbolinks-eval=false> | |
| function updateToken() { | |
| fetch('/update-csrf') | |
| .then(response => response.text()) | |
| .then(csrf => { | |
| document.head.querySelector('meta[name="csrf-token"]').setAttribute('content', csrf) | |
| }) | |
| } | |
| setInterval(updateToken, 1000 * 60 * 5) | |
| </script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {{-- You do not need to add this component if you are using the permanent option in the head component --}} | |
| <script> | |
| if (!window.sessionTimerPermanent && window.Livewire) { | |
| window.livewire.hook('afterDomUpdate', startSessionTimer) | |
| } | |
| // if you are on livewire > 1.3.1 and want to avoid the default error alert | |
| // https://github.com/livewire/livewire/pull/1146 | |
| window.livewire.onError(statusCode => { | |
| if (statusCode === 419) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| opendb () { | |
| [ ! -f .env ] && { echo "No .env file found."; exit 1; } | |
| DB_CONNECTION=$(grep DB_CONNECTION .env | grep -v -e '^\s*#' | cut -d '=' -f 2-) | |
| DB_HOST=$(grep DB_HOST .env | grep -v -e '^\s*#' | cut -d '=' -f 2-) | |
| DB_PORT=$(grep DB_PORT .env | grep -v -e '^\s*#' | cut -d '=' -f 2-) | |
| DB_DATABASE=$(grep DB_DATABASE .env | grep -v -e '^\s*#' | cut -d '=' -f 2-) | |
| DB_USERNAME=$(grep DB_USERNAME .env | grep -v -e '^\s*#' | cut -d '=' -f 2-) | |
| DB_PASSWORD=$(grep DB_PASSWORD .env | grep -v -e '^\s*#' | cut -d '=' -f 2-) |
OlderNewer