What seems to be the problem: I can’t get a model from livewire and return it to the view.
Steps to Reproduce: I want to get data from the database and display it to livewire views.
Are you using the latest version of Livewire: Yes
Do you have any screenshots or code examples: I am trying this `
public $pressList;
public function mount()
{
$user_id = Auth::user()->id;
$this->$pressList = Press::where('user_id', $user_id);
}
and this is my blade
<div>
@foreach ($pressList as $press)
{{ $press->title }}
@endforeach
</div>