Closed kkkreset closed 2 years ago
Error using attribute for form field.
` $form->image('pic', __('pic'))->required()->name(function($file) { return md5('product_pic'.time().rand(0, 10000)).'.'.$file->guessExtension(); })->setElementClass(md5(microtime(true)));
public function pic(): Attribute { return new Attribute( get: function($value) { return $value; } ); }`
ERRIR: Call to undefined method Illuminate\Database\Eloquent\Casts\Attribute::addEagerConstraints()
Call to undefined method Illuminate\Database\Eloquent\Casts\Attribute::addEagerConstraints()
Description:
Error using attribute for form field.
Steps To Reproduce:
` $form->image('pic', __('pic'))->required()->name(function($file) { return md5('product_pic'.time().rand(0, 10000)).'.'.$file->guessExtension(); })->setElementClass(md5(microtime(true)));
ERRIR:
Call to undefined method Illuminate\Database\Eloquent\Casts\Attribute::addEagerConstraints()