I have sent a collection of arrays to my Livewire controller:
@livewire(‘deals’, $deals)
Then in my controller, I accept the collection and can dd($deals) and see all the data in the collection.
<?php namespace App\Http\Livewire; use Livewire\Component; class Deals extends Component { public $deals; public function mount($deals) { //dd($deals); return view('livewire.tasks', [ 'deals' => $deals, ]); } } But I can't get it into the view. I get an error on the first line: @foreach($deals as $deal) Error: Undefined variable: deals What am I doing wrong? Thanks!