Last active
February 7, 2017 22:07
-
-
Save abdullahseba/f670bae719cc1cd3ae55ac7ab06d0b98 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace UserFrosting\Sprinkle\Site\Model; | |
use UserFrosting\Sprinkle\Account\Model\User; | |
class OwlerUser extends User { | |
/** | |
* Get the owler associated with this user. | |
*/ | |
public function owler() | |
{ | |
return $this->hasOne('\UserFrosting\Sprinkle\Site\Model\Owler', 'user_id'); | |
} | |
public function setAttributeCity() | |
{ | |
$this->owler->city(); | |
} | |
public function getAttributeCity() | |
{ | |
$this->owler->city(); | |
} | |
public function save(array $options = []) | |
{ | |
$this->owler->save(); | |
return parent::save($options); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment