-
Notifications
You must be signed in to change notification settings - Fork 118
Description
I tried to install this on Laravel 10, but the instructions don't match
-
When I want to run this on specific pages, the instructions say to first open "app/Http/Kernel.php" and then "...you should instead add a new mapping to the routeMiddleware array", but there's no such array in that Kernel-file. I can find one in another Kernel.php, where there's an empty array. Should it be added there instead?
-
Web.php seems to have a different format in Laravel 10 than last time I played around with Laravel, now a route in "web.php" looks like this: Route::get('/', function () { return view('index'); });
According to the docs, the way to do this would be: Route::middleware('page-cache')->get('/', 'PostController@index');
But that is not working. [Perhaps the issue here is that I implemented the middleware incorrectly in 1)]
Thanks!