I cant show image list on laravel, the only working part is product name.
My question is, how to write src link on image ?
I use livewire 4.17.19
This is my code
@foreach ($cartItems as $item) <td class="product-thumbnail"><img src="{{asset('storage/'.$item['cover_img'])}}" alt=""></td> <td class="product-name"><a href="#">{{$item['name']}}</a></td> @endforeach
class ThriftCart extends Component
{
public $cartItems = []; protected $listeners = ['cartUpdated'=>'onCartUpdate']; public function mount(){ $this->cartItems = \Cart::session(auth()->id())->getContent()->toArray(); } public function onCartUpdate() { $this->mount(); } public function render() { return view('livewire.thrift-cart'); }
}