Skip to content

Instantly share code, notes, and snippets.

@abdullahseba
Last active February 7, 2017 22:07
Show Gist options
  • Save abdullahseba/f670bae719cc1cd3ae55ac7ab06d0b98 to your computer and use it in GitHub Desktop.
Save abdullahseba/f670bae719cc1cd3ae55ac7ab06d0b98 to your computer and use it in GitHub Desktop.
<?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