ids = $ids; } public function GetDeviceRecords() { return Device::with('category')->whereIn('id', $this->ids)->get(); } }