Welcome all users to their status page

This commit is contained in:
James Brooks
2016-08-23 13:09:47 +01:00
parent 1b96420fc9
commit 6685ae96d8
13 changed files with 312 additions and 25 deletions

View File

@@ -21,6 +21,11 @@ use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Support\Facades\Hash;
/**
* This is the user model.
*
* @author James Brooks <james@alt-three.com>
*/
class User extends Model implements AuthenticatableContract, CanResetPasswordContract
{
use Authenticatable, CanResetPassword, ValidatingTrait;
@@ -39,6 +44,15 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
*/
const LEVEL_USER = 2;
/**
* The model's attributes.
*
* @var string[]
*/
protected $attributes = [
'welcomed' => false,
];
/**
* The attributes that should be casted to native types.
*
@@ -51,6 +65,23 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
'api_key' => 'string',
'active' => 'bool',
'level' => 'int',
'welcomed' => 'bool',
];
/**
* The fillable properties.
*
* @var string[]
*/
protected $fillable = [
'username',
'password',
'google_2fa_secret',
'email',
'api_key',
'active',
'level',
'welcomed',
];
/**