File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ class JsonController extends BasePublicController
1010{
1111 public function index (): JsonResponse
1212 {
13- $ institutions = Place::published ()->get ()->map (function ($ item ) {
13+ $ institutions = Place::query ()-> published ()->get ()->map (function ($ item ) {
1414 $ item ->url = $ item ->url ();
1515
1616 return $ item ;
@@ -21,7 +21,7 @@ public function index(): JsonResponse
2121
2222 public function show (string $ slug ): JsonResponse
2323 {
24- $ institution = Place::published ()->whereSlugIs ($ slug )->firstOrFail ();
24+ $ institution = Place::query ()-> published ()->whereSlugIs ($ slug )->firstOrFail ();
2525
2626 return response ()->json ($ institution );
2727 }
Original file line number Diff line number Diff line change @@ -10,7 +10,8 @@ class PublicController extends BasePublicController
1010{
1111 public function index (): View
1212 {
13- $ models = Place::published ()
13+ $ models = Place::query ()
14+ ->published ()
1415 ->order ()
1516 ->with ('image ' )
1617 ->get ();
@@ -21,7 +22,7 @@ public function index(): View
2122
2223 public function show (string $ slug ): View
2324 {
24- $ model = Place::published ()->whereSlugIs ($ slug )->firstOrFail ();
25+ $ model = Place::query ()-> published ()->whereSlugIs ($ slug )->firstOrFail ();
2526
2627 return view ('places::public.show ' )
2728 ->with (compact ('model ' ));
You can’t perform that action at this time.
0 commit comments