public function submissions($contest_id) { $contest = Contest::findOrFail($contest_id); $submissions = Auth::user()->fetchSubmissions()->where(['contest_id' => $contest_id])->paginate(PaginationHelper::itemsPerPage()); return view('contests.submissions', compact('contest', 'submissions')); }
public function submissions($userId) { $user = User::findOrFail($userId); $submissions = $user->fetchSubmissions()->paginate(PaginationHelper::itemsPerPage()); return view('users.submissions', compact('user', 'submissions')); }
public function index() { $problems = Problem::orderBy('name')->paginate(PaginationHelper::itemsPerPage()); return view('problems.index', compact('problems')); }