Correctly add photos to S3

This commit is contained in:
Jonny Barnes 2016-10-07 14:39:05 +01:00
parent 842dbfa87b
commit 5bfe8c5a97
3 changed files with 26 additions and 5 deletions

View file

@ -141,10 +141,12 @@ class NotesController extends Controller
$note->placeLink = '/places/' . $note->place->slug;
}
$note->photoURLs = [];
foreach ($note->getMedia() as $photo) {
$note->photoURLs[] = $photo->getUrl();
$photoURLs = [];
$photos = $note->getMedia();
foreach ($photos as $photo) {
$photoURLs[] = $photo->getUrl();
}
$note->photoURLs = $photoURLs;
return view('singlenote', [
'note' => $note,