Laravel 5.3 Tutorial - Working with Maintenance page using 503.blade.php in laravel 5.3, If we have an project using laravel, Some time we need to turn on and turn off maintenance page.
Php artisan Command in laravel 5.3 can handle this method, using turn on and turn off command, Please see all Laravel Command.
How to Turn on Maintenance page in Laravel?
Just grab you application path where laravel application installed and simply run below command.
php artisan down
After run that command, try to open your project using browser.
http://localhost:8080
By default installation laravel 5.3, responses maintenance page stored on 503.blade.php in resources\views\errors\503.blade.php directory.
<!DOCTYPE html>
<html>
<head>
<title>Be right back.</title>
<link href="https://fonts.googleapis.com/css?family=Lato:100" rel="stylesheet" type="text/css">
<style>
html, body {
height: 100%;
}
body {
margin: 0;
padding: 0;
width: 100%;
color: #B0BEC5;
display: table;
font-weight: 100;
font-family: 'Lato', sans-serif;
}
.container {
text-align: center;
display: table-cell;
vertical-align: middle;
}
.content {
text-align: center;
display: inline-block;
}
.title {
font-size: 72px;
margin-bottom: 40px;
}
</style>
</head>
<body>
<div class="container">
<div class="content">
<div class="title">MAINTENANCE MODE.</div>
</div>
</div>
</body>
</html>
How to Turn Off Maintenance Page
Just grab you application path where laravel application installed and simply run below command.
php artisan up
Maintenance Mode
In maintenance mode, a custom view will be displayed for all requests into your application. It’s a check is included in the default middleware stack for your application. If the application is in maintenance mode, an HttpException will be thrown with a status code of 503.Video Tutorial Create Maintenance Page
See you next lessons ..
Không có nhận xét nào:
Đăng nhận xét