Answer the question
In order to leave comments, you need to log in
How can I hide a block in Laravel?
There is one div inside which foreach works for me. Before this div I do a check
@if($events)
<div class="card mb-5">
....
public function index($id) {
$user = User::find($id);
$events = $user->events()->orderBy('eventdata', 'desc')->limit(3)->get();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question