Maintenance mode vs middleware to redirect in Laravel Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!How to manage a redirect request after a jQuery Ajax callHow do I redirect to another webpage?How do I make a redirect in PHP?How can I redirect and append both stdout and stderr to a file with Bash?Site in maintenance. How to redirect visitors?How do I redirect with JavaScript?What is Node.js' Connect, Express and “middleware”?Shortcut to exit scale mode in VirtualBoxHow to Get the Current URL Inside @if Statement (Blade) in Laravel 4?Laravel Middleware -> get the logged in user
what is the log of the PDF for a Normal Distribution?
Did Mueller's report provide an evidentiary basis for the claim of Russian govt election interference via social media?
Why not send Voyager 3 and 4 following up the paths taken by Voyager 1 and 2 to re-transmit signals of later as they fly away from Earth?
Why is std::move not [[nodiscard]] in C++20?
Special flights
What order were files/directories output in dir?
Does silver oxide react with hydrogen sulfide?
One-one communication
Tips to organize LaTeX presentations for a semester
Is there hard evidence that the grant peer review system performs significantly better than random?
Why shouldn't this prove the Prime Number Theorem?
Rationale for describing kurtosis as "peakedness"?
Flight departed from the gate 5 min before scheduled departure time. Refund options
What does the writing on Poe's helmet say?
Is multiple magic items in one inherently imbalanced?
The test team as an enemy of development? And how can this be avoided?
Can two people see the same photon?
Tannaka duality for semisimple groups
Does the Mueller report show a conspiracy between Russia and the Trump Campaign?
Is openssl rand command cryptographically secure?
How to write capital alpha?
Trying to understand entropy as a novice in thermodynamics
I got rid of Mac OSX and replaced it with linux but now I can't change it back to OSX or windows
How does light 'choose' between wave and particle behaviour?
Maintenance mode vs middleware to redirect in Laravel
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
Data science time! April 2019 and salary with experience
The Ask Question Wizard is Live!How to manage a redirect request after a jQuery Ajax callHow do I redirect to another webpage?How do I make a redirect in PHP?How can I redirect and append both stdout and stderr to a file with Bash?Site in maintenance. How to redirect visitors?How do I redirect with JavaScript?What is Node.js' Connect, Express and “middleware”?Shortcut to exit scale mode in VirtualBoxHow to Get the Current URL Inside @if Statement (Blade) in Laravel 4?Laravel Middleware -> get the logged in user
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I don't know much about maintenance mode in Laravel. I am currently using middleware that gets the status of the site from the db and if it is closed, redirects to a maintenance view.
What are the benefits of using Laravel's maintenance mode over this method?
laravel redirect middleware mode maintenance
add a comment |
I don't know much about maintenance mode in Laravel. I am currently using middleware that gets the status of the site from the db and if it is closed, redirects to a maintenance view.
What are the benefits of using Laravel's maintenance mode over this method?
laravel redirect middleware mode maintenance
add a comment |
I don't know much about maintenance mode in Laravel. I am currently using middleware that gets the status of the site from the db and if it is closed, redirects to a maintenance view.
What are the benefits of using Laravel's maintenance mode over this method?
laravel redirect middleware mode maintenance
I don't know much about maintenance mode in Laravel. I am currently using middleware that gets the status of the site from the db and if it is closed, redirects to a maintenance view.
What are the benefits of using Laravel's maintenance mode over this method?
laravel redirect middleware mode maintenance
laravel redirect middleware mode maintenance
edited Mar 9 at 3:21
rh16
553314
553314
asked Mar 8 at 23:20
Abdallah MekawyAbdallah Mekawy
1
1
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Laravel's maintenance mode offers a few features that you don't get from simply redirecting to a maintenance page. Whether or not you need these just depends on your particular setup.
https://laravel.com/docs/5.8/configuration#maintenance-mode
- If you have queued tasks, the queues will be paused during maintenance mode and resume when maintenance stops.
- It automatically sends a 503 status response, which is useful for API requests.
- It allows you to send a retry header in your response, so the requester can programmatically know how long to wait before trying again.
You could implement these yourself, but Laravel already has them for free. You can also customize Laravel's maintenance view, so you can still show users your own custom maintenance page when the site is down.
Just to note, there are some cases where Laravel's default maintenance mode isn't enough. If you have a multi-tenant setup on a single server, and you want to allow each tenant to enter maintenance mode independently of the others, then you would have to build your own solution.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55072341%2fmaintenance-mode-vs-middleware-to-redirect-in-laravel%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Laravel's maintenance mode offers a few features that you don't get from simply redirecting to a maintenance page. Whether or not you need these just depends on your particular setup.
https://laravel.com/docs/5.8/configuration#maintenance-mode
- If you have queued tasks, the queues will be paused during maintenance mode and resume when maintenance stops.
- It automatically sends a 503 status response, which is useful for API requests.
- It allows you to send a retry header in your response, so the requester can programmatically know how long to wait before trying again.
You could implement these yourself, but Laravel already has them for free. You can also customize Laravel's maintenance view, so you can still show users your own custom maintenance page when the site is down.
Just to note, there are some cases where Laravel's default maintenance mode isn't enough. If you have a multi-tenant setup on a single server, and you want to allow each tenant to enter maintenance mode independently of the others, then you would have to build your own solution.
add a comment |
Laravel's maintenance mode offers a few features that you don't get from simply redirecting to a maintenance page. Whether or not you need these just depends on your particular setup.
https://laravel.com/docs/5.8/configuration#maintenance-mode
- If you have queued tasks, the queues will be paused during maintenance mode and resume when maintenance stops.
- It automatically sends a 503 status response, which is useful for API requests.
- It allows you to send a retry header in your response, so the requester can programmatically know how long to wait before trying again.
You could implement these yourself, but Laravel already has them for free. You can also customize Laravel's maintenance view, so you can still show users your own custom maintenance page when the site is down.
Just to note, there are some cases where Laravel's default maintenance mode isn't enough. If you have a multi-tenant setup on a single server, and you want to allow each tenant to enter maintenance mode independently of the others, then you would have to build your own solution.
add a comment |
Laravel's maintenance mode offers a few features that you don't get from simply redirecting to a maintenance page. Whether or not you need these just depends on your particular setup.
https://laravel.com/docs/5.8/configuration#maintenance-mode
- If you have queued tasks, the queues will be paused during maintenance mode and resume when maintenance stops.
- It automatically sends a 503 status response, which is useful for API requests.
- It allows you to send a retry header in your response, so the requester can programmatically know how long to wait before trying again.
You could implement these yourself, but Laravel already has them for free. You can also customize Laravel's maintenance view, so you can still show users your own custom maintenance page when the site is down.
Just to note, there are some cases where Laravel's default maintenance mode isn't enough. If you have a multi-tenant setup on a single server, and you want to allow each tenant to enter maintenance mode independently of the others, then you would have to build your own solution.
Laravel's maintenance mode offers a few features that you don't get from simply redirecting to a maintenance page. Whether or not you need these just depends on your particular setup.
https://laravel.com/docs/5.8/configuration#maintenance-mode
- If you have queued tasks, the queues will be paused during maintenance mode and resume when maintenance stops.
- It automatically sends a 503 status response, which is useful for API requests.
- It allows you to send a retry header in your response, so the requester can programmatically know how long to wait before trying again.
You could implement these yourself, but Laravel already has them for free. You can also customize Laravel's maintenance view, so you can still show users your own custom maintenance page when the site is down.
Just to note, there are some cases where Laravel's default maintenance mode isn't enough. If you have a multi-tenant setup on a single server, and you want to allow each tenant to enter maintenance mode independently of the others, then you would have to build your own solution.
edited Mar 9 at 2:37
answered Mar 9 at 2:28
newUserName02newUserName02
668514
668514
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55072341%2fmaintenance-mode-vs-middleware-to-redirect-in-laravel%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown