Skip to content
Advertisement

Display all images one by one laravel

On the backend side, my pictures are loaded normally, but I have problems with displaying them on the front

My Model

JavaScript

I am trying to display all the images on the page like this

My page.blade.php

JavaScript

But I am getting an error: Undefined variable: $images

I need to declare this variable with an array of pictures somewhere on the client side or what to do?

My Controller

JavaScript

How can I get all the pictures?

Advertisement

Answer

Here Image is your model name and you need to select all the images so just write done like this model name : all

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement