Skip to content

Commit 7547606

Browse files
committed
updated docs, removed 8.1 attempted tests and ready for release 2.0.1
1 parent fa9e51d commit 7547606

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

.github/workflows/php8-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
fail-fast: true
1111
matrix:
12-
php: ['8.0', 8.1]
12+
php: ['8.0']
1313

1414
name: PHP ${{ matrix.php }}
1515

README.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,21 @@ This library provides a simple class to help make a `Presenter` for your objects
2424

2525
## Installation
2626

27-
### Composer
27+
```bash
28+
composer require robclancy/presenter:^2.0
29+
```
30+
or
2831

2932
Add `robclancy/presenter` to the "require" section of your `composer.json` file.
30-
3133
```json
32-
"robclancy/presenter": "2.0.*"
34+
"robclancy/presenter": "^2.0"
3335
```
3436

3537
Run `composer update` to get the latest version of the package.
3638

37-
38-
### Manually
39-
40-
It's recommended that you use Composer, however you can download and install from this repository.
41-
42-
4339
### Laravel
4440

45-
This package comes with an optional service provider for Laravel 5.8+ so that you can automate some extra steps. You will need to have installed using the composer method above, then register the service provider with your application.
41+
This package comes with an optional service provider for Laravel 5.8+ < Laravel 10 so that you can automate some extra steps. You will need to have installed using the composer method above, then register the service provider with your application.
4642

4743
Open `app/config/app.php` and find the `providers` key. Add
4844
```
@@ -55,7 +51,6 @@ to the array at some point after
5551

5652
Now presenters will automatically be created if using the <a href="#laravel-usage">laravel method</a> described below.
5753

58-
5954
## Usage
6055

6156
`Presenter` is a very simple class that overloads methods and variables so that you can add extra logic to your objects or arrays without adding view logic to areas like your models or controllers and also keeps any extra logic out of your views.
@@ -76,7 +71,7 @@ class UserPresenter extends Robbo\Presenter\Presenter {
7671
```
7772

7873
Now our view should receive an instance of this presenter which would be created with something like `$user = new UserPresenter(new User);`. If we want to link to the users page all we have to do is call `$user->url()`. Now you have good separation of logic and an easy little class you can modify to add properties to your `User` in all areas.
79-
However you might not want to be calling methods like this, it could be inconsistent with what you are doing or you might want the code to look a little cleaner. That is where methods with the `present` prefix come in. All we do is update the presenter to the following.
74+
However, you might not want to be calling methods like this, it could be inconsistent with what you are doing, or you might want the code to look a little cleaner. That is where methods with the `present` prefix come in. All we do is update the presenter to the following.
8075

8176
```php
8277

@@ -266,6 +261,12 @@ And that is all there is to it. You can easily automate the creation of presente
266261

267262
## Change Log
268263

264+
#### 2.0.1
265+
266+
- branched off 2.x to support < PHP 8.1
267+
- modernized the repository somewhat
268+
- updated documentation
269+
269270
#### 2.0.0
270271

271272
- minimum Laravel version is now 5.8

0 commit comments

Comments
 (0)