blog-app/views/redirect.blade.php

17 lines
381 B
PHP
Raw Normal View History

2021-09-16 20:27:51 +08:00
@extends('layout.master')
@section('content')
<p>{{ $message }}</p>
<p>You will be redirected to homepage in <span id="sec">10</span> seconds.</p>
<script>
setInterval(function () {
var sec = document.getElementById('sec');
sec.textContent -= 1;
if (sec.textContent == 0) {
window.location = '/';
}
}, 1000);
</script>
@endsection