orchidsoftware / crud

Simplify the process of building CRUD (Create, Read, Update, Delete) functionality in Laravel using the features of Orchid.
https://orchid.software
MIT License
138 stars 34 forks source link

Render image in Slight #44

Closed singhhp1069 closed 3 years ago

singhhp1069 commented 3 years ago

Hi,

I am using the CRUD package but how to render image here:

Sight::make('image'); (this is just a text)

I tried:

Sight::make('image')->render(function (){ return Picture::make('image'); }),

but it returned an error and also I didn't found any solution in the documentation, can you help here?

singhhp1069 commented 3 years ago

got the solution:

Sight::make('image')->render(function (Category $category) { return '<img src="'.$category->icon.'"'; }),