Skip to content

Commit 978bd61

Browse files
authored
Update defining-conversions.md (#3496)
1 parent 6b3c282 commit 978bd61

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/converting-images/defining-conversions.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ You can register as many media conversions as you want
6565

6666
```php
6767
// in your model
68-
use Spatie\Image\Manipulations;
68+
use Spatie\Image\Enums\BorderType;
69+
use Spatie\Image\Enums\CropPosition;
6970

7071
// ...
7172

@@ -78,10 +79,10 @@ use Spatie\Image\Manipulations;
7879

7980
$this->addMediaConversion('old-picture')
8081
->sepia()
81-
->border(10, 'black', Manipulations::BORDER_OVERLAY);
82+
->border(10, BorderType::Overlay, 'black');
8283

8384
$this->addMediaConversion('thumb-cropped')
84-
->crop('crop-center', 400, 400); // Trim or crop the image to the center for specified width and height.
85+
->crop(400, 400, CropPosition::Center); // Trim or crop the image to the center for specified width and height.
8586
}
8687
```
8788

0 commit comments

Comments
 (0)