Skip to content

Commit d8978e0

Browse files
committed
Update getProfile method in GetProfileShopController to filter shops by active state before random selection
1 parent 3779f34 commit d8978e0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/Http/Controllers/Shops/GetProfileShopController.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ class GetProfileShopController extends Controller
1111
{
1212
public function getProfile(){
1313
return response()->json(ShopProfileResource::collection(
14-
Shop::inRandomOrder()->take(6)->get()));
14+
Shop::where('state', 1)
15+
->inRandomOrder()
16+
->take(6)
17+
->get()
18+
));
1519
}
1620
}

0 commit comments

Comments
 (0)