Closed devmsh closed 6 years ago
You can achieve this using an Avatar field for the other views:
ImageCropper::make('Photo')->disk('s3')->onlyOnForms(),
Avatar::make('Photo')->disk('s3')->exceptOnForms(),
This way you see an avatar in detail and index view and you can edit the image in forms
Why I need to do this nested of having Single Field?
Just giving you a quick solution. Of course this field is improvable. We are always willing of hearing request and PRs!
🙌
1.0.4 published. Theres no need to use Avatar field when using
ImageCropper::make('Photo')->avatar(),
I created new empty custom field that extends ImageCropper and implements Cover:
use Laravel\Nova\Contracts\Cover;
use R64\NovaImageCropper\ImageCropper as R64ImageCropper;
class NovaImageCropper extends R64ImageCropper implements Cover
{
}
avatars are displayed in search
Thanks for the library
Did you plan to support avatar?