Пример #1
0
 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'));
 }
Пример #2
0
 public function submissions($userId)
 {
     $user = User::findOrFail($userId);
     $submissions = $user->fetchSubmissions()->paginate(PaginationHelper::itemsPerPage());
     return view('users.submissions', compact('user', 'submissions'));
 }
Пример #3
0
 public function index()
 {
     $problems = Problem::orderBy('name')->paginate(PaginationHelper::itemsPerPage());
     return view('problems.index', compact('problems'));
 }