Files
cachet-docker/app/models/User.php
2014-12-01 16:46:56 +00:00

38 lines
815 B
PHP

<?php
use Illuminate\Auth\UserTrait;
use Illuminate\Auth\UserInterface;
use Illuminate\Auth\Reminders\RemindableTrait;
use Illuminate\Auth\Reminders\RemindableInterface;
class User extends Eloquent implements UserInterface, RemindableInterface {
use UserTrait, RemindableTrait;
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'users';
/**
* The attributes excluded from the model's JSON form.
*
* @var array
*/
protected $hidden = ['password', 'remember_token'];
/**
* Hash any password being inserted by default
*
* @param string @password
* @return void
*/
public function setPasswordAttribute($password) {
$this->attributes['password'] = Hash::make($password);
}
}