/** * accessor methods */ public function getOwnerAttribute() { $owner = Owner::getIndex($this->project_owner_uid); if ($owner) { return $owner->toArray(); } }
/** * accessor methods */ public function getPackageOwnerAttribute() { // check to see if user is logged in // $user = User::getIndex(Session::get('user_uid')); if ($user) { // fetch owner information // $owner = Owner::getIndex($this->package_owner_uuid); if ($owner) { return $owner->toArray(); } } }