pixelfed/app/User.php
Daniel Supernault 9dd58c5abd Add profile model, migration and controller
Also added User model observer to create a profile when a new user is
created.
2018-04-15 18:52:22 -06:00

35 lines
612 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);
}
}