business_id; $brands = Brands::where('business_id', $business_id) ->get(); return CommonResource::collection($brands); } /** * Get the specified brand * * @urlParam brand required comma separated ids of the brands Example: 1 * @response { "data": [ { "id": 1, "business_id": 1, "name": "Levis", "description": null, "created_by": 1, "deleted_at": null, "created_at": "2018-01-03 21:19:47", "updated_at": "2018-01-03 21:19:47" } ] } */ public function show($brand_ids) { $user = Auth::user(); $business_id = $user->business_id; $brand_ids = explode(',', $brand_ids); $brands = Brands::where('business_id', $business_id) ->whereIn('id', $brand_ids) ->get(); return CommonResource::collection($brands); } }