diff options
author | Camil Staps | 2015-05-14 11:18:12 +0200 |
---|---|---|
committer | Camil Staps | 2015-05-14 11:18:12 +0200 |
commit | a012ea9e7d5dd0baadb549e1460a8339224f37a5 (patch) | |
tree | a74414754eb8d00d21d92d1ca5be274235ac8e52 /src/CamilStaps/BotleaguesApi/UserToken.php | |
parent | Password reminders start (diff) |
Own Model class; new namespaces Database and Controllers; RFC2822 dates
Diffstat (limited to 'src/CamilStaps/BotleaguesApi/UserToken.php')
-rw-r--r-- | src/CamilStaps/BotleaguesApi/UserToken.php | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/CamilStaps/BotleaguesApi/UserToken.php b/src/CamilStaps/BotleaguesApi/UserToken.php deleted file mode 100644 index 9909f6a..0000000 --- a/src/CamilStaps/BotleaguesApi/UserToken.php +++ /dev/null @@ -1,21 +0,0 @@ -<?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']; - - /** - * 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); - - return parent::save($options); - } - -}
\ No newline at end of file |