44 lines
852 B
PHP
44 lines
852 B
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
use Laravel\Passport\HasApiTokens;
|
|
use Illuminate\Notifications\Notifiable;
|
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
|
use Spatie\Permission\Traits\HasRoles;
|
|
|
|
class User extends Authenticatable
|
|
{
|
|
use Notifiable, HasApiTokens, HasRoles;
|
|
|
|
/**
|
|
* Define the base table name
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $table = 'users';
|
|
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $fillable = [
|
|
'name', 'email', 'password',
|
|
];
|
|
|
|
/**
|
|
* The attributes that should be hidden for arrays.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $hidden = [
|
|
'password', 'remember_token',
|
|
];
|
|
|
|
public function karyawans()
|
|
{
|
|
return $this->hasMany(\Modules\Karyawaf\Entities\Karyawan::class, 'created_by');
|
|
}
|
|
}
|