/** * Retrieve cost centers by parent * * @param int $id Organization id * * @return Illuminate\Database\Eloquent\Collection */ public function byParent($id) { return $this->CostCenter->where('parent_cc_id', '=', $id)->get(); }