Skip to content

Instantly share code, notes, and snippets.

@wichaksono
Created March 10, 2018 02:50
Show Gist options
  • Save wichaksono/991d585cb062379efce548692e8e661f to your computer and use it in GitHub Desktop.
Save wichaksono/991d585cb062379efce548692e8e661f to your computer and use it in GitHub Desktop.
<?php
namespace App;
use App\Models\SocialAccount;
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', 'email', 'password', 'avatar'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
'password', 'remember_token',
];
public function socialAccount()
{
return $this->hasMany(SocialAccount::class);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment