admin
admin copied to clipboard
Getting error while dealing with images
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".
I think you got error here -> FormItem::image('path', 'Image'); must be - > FormItem::image('image', 'Image');