diff options
author | Camil Staps | 2015-05-10 19:11:07 +0300 |
---|---|---|
committer | Camil Staps | 2015-05-10 19:11:07 +0300 |
commit | bdf893e87b3fa6b34b08c78b060553e3e88f2c82 (patch) | |
tree | fad3716da90ef4cd503cffd7ffb081b506979a7d /src/CamilStaps/BotleaguesApi/UserToken.php | |
parent | UserTokens (diff) |
Cleanup; show user_token-token field on store request (POST)
Diffstat (limited to 'src/CamilStaps/BotleaguesApi/UserToken.php')
-rw-r--r-- | src/CamilStaps/BotleaguesApi/UserToken.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/CamilStaps/BotleaguesApi/UserToken.php b/src/CamilStaps/BotleaguesApi/UserToken.php index 02a8891..9909f6a 100644 --- a/src/CamilStaps/BotleaguesApi/UserToken.php +++ b/src/CamilStaps/BotleaguesApi/UserToken.php @@ -9,6 +9,9 @@ class UserToken extends Model { protected $hidden = ['token']; protected $fillable = ['userId', 'token', 'valid_till']; + /** + * Override the parent's save() function to automatically update the valid_till timestamp + */ public function save(array $options = array()) { $this->valid_till = date("Y-m-d H:i:s", time() + 3600); |