Skip to content

Commit

Permalink
Update preparing-your-model.md (spatie#2955)
Browse files Browse the repository at this point in the history
When implementing the `registerMediaConversions()` method, it is not clear that additional models need to be imported. Hopefully this PR makes it a little more clear for users with an IDE that does not automatically import the required models.
  • Loading branch information
timgavin authored Jun 22, 2022
1 parent 3205c7b commit 364949e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/basic-usage/preparing-your-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ The `Collection` component will show a preview thumbnail for items in the collec
To generate that thumbnail, you must add a conversion like this one to your model.

```php
use Spatie\Image\Manipulations;
use Spatie\MediaLibrary\MediaCollections\Models\Media;

public function registerMediaConversions(Media $media = null): void
{
$this
Expand Down

0 comments on commit 364949e

Please sign in to comment.