File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,7 +34,13 @@ public static function uriKey(): string
3434
3535 public static function indexQuery (NovaRequest $ request , $ query )
3636 {
37- return $ query ->where ('id ' , 1 );
37+ if (!\Illuminate \Support \Facades \Schema::hasTable ('csr_campaign_page ' )) {
38+ return $ query ->whereRaw ('1 = 0 ' );
39+ }
40+
41+ $ page = \App \CsrCampaignPage::config ();
42+
43+ return $ query ->where ('id ' , $ page ->id );
3844 }
3945
4046 public static function authorizedToCreate (Request $ request ): bool
Original file line number Diff line number Diff line change @@ -33,7 +33,13 @@ public static function uriKey(): string
3333
3434 public static function indexQuery (NovaRequest $ request , $ query )
3535 {
36- return $ query ->where ('id ' , 1 );
36+ if (!\Illuminate \Support \Facades \Schema::hasTable ('dance_page ' )) {
37+ return $ query ->whereRaw ('1 = 0 ' );
38+ }
39+
40+ $ page = \App \DancePage::config ();
41+
42+ return $ query ->where ('id ' , $ page ->id );
3743 }
3844
3945 public static function authorizedToCreate (Request $ request ): bool
Original file line number Diff line number Diff line change @@ -42,12 +42,24 @@ public static function authorizedToViewAny(Request $request): bool
4242
4343 public static function indexQuery (NovaRequest $ request , $ query )
4444 {
45- return $ query ->where ('id ' , 1 );
45+ if (!\Illuminate \Support \Facades \Schema::hasTable ('get_involved_page ' )) {
46+ return $ query ->whereRaw ('1 = 0 ' );
47+ }
48+
49+ $ page = \App \GetInvolvedPage::config ();
50+
51+ return $ query ->where ('id ' , $ page ->id );
4652 }
4753
4854 public static function relatableQuery (NovaRequest $ request , $ query )
4955 {
50- return $ query ->where ('id ' , 1 );
56+ if (!\Illuminate \Support \Facades \Schema::hasTable ('get_involved_page ' )) {
57+ return $ query ->whereRaw ('1 = 0 ' );
58+ }
59+
60+ $ page = \App \GetInvolvedPage::config ();
61+
62+ return $ query ->where ('id ' , $ page ->id );
5163 }
5264
5365 public static function authorizedToCreate (Request $ request ): bool
Original file line number Diff line number Diff line change @@ -33,7 +33,13 @@ public static function uriKey(): string
3333
3434 public static function indexQuery (NovaRequest $ request , $ query )
3535 {
36- return $ query ->where ('id ' , 1 );
36+ if (!\Illuminate \Support \Facades \Schema::hasTable ('online_courses_page ' )) {
37+ return $ query ->whereRaw ('1 = 0 ' );
38+ }
39+
40+ $ page = \App \OnlineCoursesPage::config ();
41+
42+ return $ query ->where ('id ' , $ page ->id );
3743 }
3844
3945 public static function authorizedToCreate (Request $ request ): bool
Original file line number Diff line number Diff line change @@ -33,7 +33,13 @@ public static function uriKey(): string
3333
3434 public static function indexQuery (NovaRequest $ request , $ query )
3535 {
36- return $ query ->where ('id ' , 1 );
36+ if (!\Illuminate \Support \Facades \Schema::hasTable ('treasure_hunt_page ' )) {
37+ return $ query ->whereRaw ('1 = 0 ' );
38+ }
39+
40+ $ page = \App \TreasureHuntPage::config ();
41+
42+ return $ query ->where ('id ' , $ page ->id );
3743 }
3844
3945 public static function authorizedToCreate (Request $ request ): bool
You can’t perform that action at this time.
0 commit comments