11<?php
22
3+ /**
4+ * @Author: Bernard Hanna
5+ * @Date: 2025-01-29 14:25:28
6+ * @Last Modified by: Bernard Hanna
7+ * @Last Modified time: 2025-03-13 17:52:44
8+ */
9+
310namespace App \Http \Controllers ;
411
512use App \CertificateExcellence ;
613use App \Excellence ;
714use App \Queries \ExcellenceQuery ;
8- use Gate ;
915use Illuminate \Http \RedirectResponse ;
1016use Illuminate \Http \Request ;
1117use Illuminate \View \View ;
@@ -14,27 +20,11 @@ class ExcellenceController extends Controller
1420{
1521 public function report ($ edition ): View
1622 {
17-
18- // Check if user is a winner for this edition
19- if (Gate::denies ('report-excellence ' , $ edition )) {
20- // The current user can't report for excellence...
21- abort (403 , 'You are not eligible to receive a Codeweek4All Excellence Certificate. ' );
22-
23- }
24-
2523 return view ('excellence.report ' , compact ('edition ' ));
26-
2724 }
2825
2926 public function generate ($ edition , Request $ request ): RedirectResponse
3027 {
31-
32- if (Gate::denies ('report-excellence ' , $ edition )) {
33- // The current user can't report for excellence...
34- abort (403 , 'You are not eligible to receive a Codeweek4All Excellence Certificate. ' );
35-
36- }
37-
3828 $ rules = [
3929 'name_for_certificate ' => 'required|max:40|regex:/^[^ə]*$/u ' ,
4030 ];
@@ -56,6 +46,5 @@ public function generate($edition, Request $request): RedirectResponse
5646 ]);
5747
5848 return redirect ('certificates ' );
59-
6049 }
6150}
0 commit comments