54
Laravel: The hidden SetCacheHeaders Middleware

Laravel: The hidden SetCacheHeaders Middleware

5 years ago
Anonymous $syBn1NGQOq

https://medium.com/@DarkGhostHunter/laravel-the-hidden-setcacheheaders-middleware-4cd594ba462f

FOUND YOU!There are a lot of useful middlewares already registered inside Laravel, like the authentication mechanisms, authorization, a throttler, and even the one responsible to make route model binding possible. Practically, your middleware needs are covered. Except for one.

There is one middleware that doesn’t get the spotlight in Laravel. It’s called SetCacheHeaders, which is aliased as cache.headers. And, there is no mention of it in the documentation. I’m not joking, guys:

Laravel: The hidden SetCacheHeaders Middleware

Apr 9, 2019, 1:19am UTC
https://medium.com/@DarkGhostHunter/laravel-the-hidden-setcacheheaders-middleware-4cd594ba462f > FOUND YOU!There are a lot of useful middlewares already registered inside Laravel, like the authentication mechanisms, authorization, a throttler, and even the one responsible to make route model binding possible. Practically, your middleware needs are covered. Except for one. > There is one middleware that doesn’t get the spotlight in Laravel. It’s called SetCacheHeaders, which is aliased as cache.headers. And, there is no mention of it in the documentation. I’m not joking, guys: