sunel / eav

Entity–attribute–value model (EAV) for Laravel Artisan
https://sunel.github.io/eav/
143 stars 39 forks source link

Update Method in Controllers #34

Closed livevasiliy closed 5 years ago

livevasiliy commented 5 years ago

Hello, @sunel !

I write a controller to handle CRUD attributes. I get errors in the edit method. Eav\Attribute::code must return a relationship instance. (View: C:\OSPanel\domains\vpalette\resources\views\admin_product_attributes\fields.blade.php) (View: C:\OSPanel\domains\vpalette\resources\views\admin_product_attributes\fields.blade.php)

image

Where AttributeModel it's use Eav\Attribute as AttributeModel;

How to correct made ?

sunel commented 5 years ago

@livevasiliy

Seems like the issue is in the view, can you post the blade file ??

livevasiliy commented 5 years ago

@sunel

https://1drv.ms/f/s!AiKdJriEUgPqgfcJrj84eDEoXZWfjg My source

livevasiliy commented 5 years ago

@sunel

Why method show working a correct, but the edit method with the analogy code the show not work ??

sunel commented 5 years ago

@livevasiliy

code is a method in the class Eav\Attribute, use attribute_code in fields.blade.php Line No 22

livevasiliy commented 5 years ago

@sunel !

Hey, it's work! Thanks 😁👍👌