Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieving deffered uploaded images #48

Closed
amjadniazi48 opened this issue Apr 29, 2018 · 0 comments
Closed

Retrieving deffered uploaded images #48

amjadniazi48 opened this issue Apr 29, 2018 · 0 comments

Comments

@amjadniazi48
Copy link

amjadniazi48 commented Apr 29, 2018

i have uploaded multiple images with deffered binding and save them using this method
$project->save(null, post('_session_key'));
they are saved and i can see them on backend but when i try to retrieve them using sitesearch plugin everything in database model is retrieving but cannot get the images , following is my relation
$attachMany=[ 'postingimage'=>['System\Models\File', 'order' => 'sort_order'] ];
follwing is the code in sitesearch plugin for retrieving


if ($item->postingimage) {
                
                   return [
                       'title' => $item->title,
                       'text' => $item->description,
                       'text' => $item->price,
                       'text' => $item->brandname,
                       'text' => $item->name,
                         'thumb'     => $item->postingimage->first(),
                       'relevance' => $relevance, // higher relevance results in a higher
                       'model' => $item, 
                   ];
}

but when i print this model i got the following result

{"title":"gdsag","brandname":"Yamaha","description":"gdsga","price":5887,"name":"Rawalpindi",
"postingimage":[]}

everthing is there except images
Raise this issue on sitesearch plugin as well
OFFLINE-GmbH/oc-site-search-plugin#56

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant