aboutsummaryrefslogtreecommitdiff
path: root/src/CamilStaps/BotleaguesApi/UserToken.php
diff options
context:
space:
mode:
authorCamil Staps2015-05-14 11:18:12 +0200
committerCamil Staps2015-05-14 11:18:12 +0200
commita012ea9e7d5dd0baadb549e1460a8339224f37a5 (patch)
treea74414754eb8d00d21d92d1ca5be274235ac8e52 /src/CamilStaps/BotleaguesApi/UserToken.php
parentPassword 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.php21
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