Вот мой код:
Контроллер
Код: Выделить всё
public function dashboardEvents(){
//Brings all the info from the user events
$data['events'] = UserEvent::where('user_id', Auth::user()->id)->get();
//This is to know if there's more than one record
if(UserEvent::where('user_id', Auth::user()->id)->get()->count()>1) {
$data['multiple'] = true;
} else {
$data['multiple'] = false;
}
return view('user-pages/my-events', $data);
}
Код: Выделить всё
User Dashboard
Подробнее здесь: [url]https://stackoverflow.com/questions/39428972/how-to-update-inputs-based-on-a-modal-selection[/url]
Мобильная версия