admin icon indicating copy to clipboard operation
admin copied to clipboard

Getting error while dealing with images

Open hassansaqib opened this issue 9 years ago • 1 comments

Hi, I am getting the following error.

FatalErrorException in FormBuilder.php line 282: Call to a member function exists() on string

Can you guide me how to resolve it?

My code is as follows:

title('Index Images')->filters(function () { })->columns(function () { Column::string('id', 'ID'); Column::string('title', 'Title'); })->form(function () { FormItem::text('title', 'Title'); FormItem::textarea('discription', 'Description'); FormItem::image('path', 'Image'); }); where path is the full address including the name of image relative to the public folder. i.e. "images\index2.png".

hassansaqib avatar Feb 23 '16 11:02 hassansaqib

I think you got error here -> FormItem::image('path', 'Image'); must be - > FormItem::image('image', 'Image');

strotmann avatar Apr 01 '16 15:04 strotmann