diff --git a/app/Tricks/User.php b/app/Tricks/User.php index 097e014..f9d3338 100644 --- a/app/Tricks/User.php +++ b/app/Tricks/User.php @@ -69,6 +69,36 @@ public function votes() return $this->belongsToMany('Tricks\Trick', 'votes'); } + /** + * Get the remember me token from DB + * + * @return mixed + */ + public function getRememberToken() + { + return $this->remember_token; + } + + /** + * Set the remember me token to DB + * + * @return mixed + */ + public function setRememberToken($value) + { + $this->remember_token = $value; + } + + /** + * Get the column of remember me token in DB + * + * @return mixed + */ + public function getRememberTokenName() + { + return 'remember_token'; + } + /** * Get the unique identifier for the user. * diff --git a/app/database/migrations/2014_04_17_181442_add_remember_to_user_table.php b/app/database/migrations/2014_04_17_181442_add_remember_to_user_table.php new file mode 100644 index 0000000..b626d9c --- /dev/null +++ b/app/database/migrations/2014_04_17_181442_add_remember_to_user_table.php @@ -0,0 +1,34 @@ +string('remember_token',100)->nullable()->after('id'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('users', function($table) + { + $table->dropColumn('order'); + }); + } + +} \ No newline at end of file