Skip to content

Commit

Permalink
Update readme with version info
Browse files Browse the repository at this point in the history
  • Loading branch information
JosephSilber committed Mar 19, 2024
1 parent 1e20afd commit 6c37f01
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,16 @@ Using the middleware included in this package, you can selectively cache the res

## Installation

> **Note**: The current version of the `page-cache` packagerequires PHP 8.2+ and Laravel 11+.
>
> If you're on Laravel v5-v10, use [`page-cache` v1.0.9](https://github.com/JosephSilber/page-cache/tree/v1.0.9).
Install the `page-cache` package with composer:

```
$ composer require silber/page-cache
```

### Service Provider

> **Note**: If you're using Laravel 5.5+, the service provider will be registered automatically. You can simply skip this step entirely.
Open `config/app.php` and add a new item to the `providers` array:

```php
Silber\PageCache\LaravelServiceProvider::class,
```

### Middleware

Open `app/Http/Kernel.php` and add a new item to the `web` middleware group:
Expand All @@ -73,8 +67,6 @@ protected $middlewareAliases = [
];
```

> **Note**: Before Laravel 10, `middlewareAliases` was called `routeMiddleware`. They work the exact same way.
Once registered, you can then [use this middleware on individual routes](#using-the-middleware).

### URL rewriting
Expand Down

0 comments on commit 6c37f01

Please sign in to comment.