Laravel Livewire & API Response Help

cheatshaven

Member
Jul 30, 2019
67
54
18
Hey guys, I'm a newbie dev working on a Laravel livewire app. I am trying to loop through this response in the view. Its been 3 days and I can't seem to access the array. Anyone-one with the knowledge please assist.

Livewire Controller:
public $keyword;


$response = Http::get($getKeywords)->json();
$this->keyword = $response;


The below is the data returned when: dd ($this->keyword);

Capture.PNG


Blade view:
@foreach($this->keyword as $keywords)
{$keywords['text']}
@endforeach

Please help me return the data in the view.
 

Forum statistics

Threads
69,227
Messages
908,445
Members
237,061
Latest member
itachii

About us

  • Our community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day to make sure our community is one of the best.

Quick Navigation

User Menu