-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Customizing Thumbnails Issue #41
Comments
That's right, the docs need to be updated. You can access the value using |
In next release the value and disk properties will be pass to callback. ->thumbnail(function ($value, $disk) {
return Storage::disk(value)->url($disk);
}) |
@davidhemphill The docs need updating. I also had to check the issues to get past this. |
@jboka maybe open a issue on https://github.com/laravel/nova-docs/issues detailing what needs to be updated in the docs / your workaround |
Created PR: laravel/nova-docs#123 |
When trying to customize the thumbnail URL generation method, $this->value is empty because $this refers to the current resource model and not the field class.
As a work-around I just replaced $this->value with $this->image which refers directly to the column name of the resource model.
The text was updated successfully, but these errors were encountered: