ids = $ids; } public function GetCategoryRecords() { return Category::with('device')->whereIn('id', $this->ids)->get(); } }