1
0
Fork 0
forked from mirror/pixelfed
pixelfed/app/User.php
2018-04-18 23:57:31 -06:00

39 lines
694 B
PHP

<?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name', 'username', 'email', 'password',
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
'password', 'remember_token',
];
public function profile()
{
return $this->hasOne(Profile::class);
}
public function url()
{
return url('/' . $this->username);
}
}