for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace CodexShaper\OAuth2\Server\Models;
use Illuminate\Database\Eloquent\Model;
class User extends Model
{
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name', 'email', 'password',
];
* The attributes that should be hidden for arrays.
protected $hidden = [
'password', 'remember_token',
* The attributes that should be cast to native types.
protected $casts = [
'email_verified_at' => 'datetime',
* User identifier field.
protected $username = 'email';
* Get user identifier field.
* @return string
public function getUserIndentifier()
return $this->username;
}