Skip to content

Commit

Permalink
Improved static caches.
Browse files Browse the repository at this point in the history
  • Loading branch information
neochief committed Sep 12, 2018
1 parent 13f6082 commit afb4758
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/JetPagesServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function boot()
*/
public function map(Router $router)
{
$router->group(['namespace' => __NAMESPACE__ . '\Controllers', 'middleware' => 'web'], function () use ($router) {
$router->group(['namespace' => __NAMESPACE__ . '\Controllers'], function () use ($router) {
$router->get('ajax/jetpages/timestamp', 'PageController@getContentTimestamp');

$router->group(['middleware' => ['static-cache']], function () use ($router) {
Expand All @@ -98,7 +98,7 @@ public function map(Router $router)
// the route list. Otherwise, catch-all route will break some other
// routes registered after it.
$this->app->booted(function () use ($router) {
$router->group(['namespace' => __NAMESPACE__ . '\Controllers', 'middleware' => ['web', 'static-cache']], function () use ($router) {
$router->group(['namespace' => __NAMESPACE__ . '\Controllers', 'middleware' => ['static-cache']], function () use ($router) {
// Specific override for a front page to overcome default laravel's route in app/Http/routes.php
$router->get('/', 'PageController@show');
$router->get('{all}', 'PageController@show')->where(['all' => '.*']);
Expand Down

0 comments on commit afb4758

Please sign in to comment.