Skip to content
Advertisement

Laravel – Maintenance mode just for some urls

I need to use the Maintenance mode using the artisan command "down", but just for some urls…

In my case, i want that all urls that starts with "/admin/*" continue working.

Is there a solution?

Advertisement

Answer

Suggest by @lukasgeiter I created a middleware that tests my url… That`s my code:

JavaScript

After that I created a route that show de maintenance view:

JavaScript

Now I can call the command "up" and the application still under maintenance, but the /admin urls…

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement