diff options
author | Camil Staps | 2015-05-10 18:56:16 +0300 |
---|---|---|
committer | Camil Staps | 2015-05-10 18:56:16 +0300 |
commit | 03d9e3313fb01033a95e3d09a75be3482cabf032 (patch) | |
tree | dd3ce9fdf6a7283b4cec1e1e75727873b7df17cf /src/CamilStaps/BotleaguesApi/UserToken.php | |
parent | LoginException; RedirectException (diff) |
UserTokens
Diffstat (limited to 'src/CamilStaps/BotleaguesApi/UserToken.php')
-rw-r--r-- | src/CamilStaps/BotleaguesApi/UserToken.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/CamilStaps/BotleaguesApi/UserToken.php b/src/CamilStaps/BotleaguesApi/UserToken.php new file mode 100644 index 0000000..02a8891 --- /dev/null +++ b/src/CamilStaps/BotleaguesApi/UserToken.php @@ -0,0 +1,18 @@ +<?php +namespace CamilStaps\BotleaguesApi; + +use Illuminate\Database\Eloquent\Model; + +class UserToken extends Model { + + protected $table = 'user_tokens'; + protected $hidden = ['token']; + protected $fillable = ['userId', 'token', 'valid_till']; + + public function save(array $options = array()) { + $this->valid_till = date("Y-m-d H:i:s", time() + 3600); + + return parent::save($options); + } + +}
\ No newline at end of file |