2014-06-28 02:41:44 -05:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Auth\Reminders\RemindableInterface;
|
2014-07-05 09:19:15 -05:00
|
|
|
use Illuminate\Auth\Reminders\RemindableTrait;
|
|
|
|
use Illuminate\Auth\UserInterface;
|
|
|
|
use Illuminate\Auth\UserTrait;
|
2014-06-28 02:41:44 -05:00
|
|
|
|
2014-06-29 15:12:33 -05:00
|
|
|
class User extends Elegant implements UserInterface, RemindableInterface
|
|
|
|
{
|
|
|
|
|
|
|
|
use UserTrait, RemindableTrait;
|
|
|
|
|
|
|
|
|
2014-07-05 09:19:15 -05:00
|
|
|
public static $rules
|
|
|
|
= [
|
|
|
|
'email' => 'required|email|unique:users,email',
|
|
|
|
'migrated' => 'required|numeric|between:0,1',
|
|
|
|
'password' => 'required|between:60,60',
|
|
|
|
'reset' => 'between:32,32',
|
|
|
|
];
|
2014-06-29 15:12:33 -05:00
|
|
|
/**
|
|
|
|
* The database table used by the model.
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $table = 'users';
|
|
|
|
/**
|
|
|
|
* The attributes excluded from the model's JSON form.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
2014-07-03 02:43:12 -05:00
|
|
|
protected $hidden = array('remember_token');
|
2014-06-28 02:41:44 -05:00
|
|
|
|
2014-07-05 09:19:15 -05:00
|
|
|
public function accounts()
|
|
|
|
{
|
2014-06-30 00:26:38 -05:00
|
|
|
return $this->hasMany('Account');
|
|
|
|
}
|
|
|
|
|
2014-07-03 02:43:12 -05:00
|
|
|
}
|