employee crud
This commit is contained in:
@ -7,6 +7,7 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Laravel\Sanctum\HasApiTokens;
|
||||
use Modules\Employee\Models\Employee;
|
||||
use Spatie\Permission\Traits\HasRoles;
|
||||
|
||||
class User extends Authenticatable
|
||||
@ -45,7 +46,8 @@ class User extends Authenticatable
|
||||
'email_verified_at' => 'datetime',
|
||||
];
|
||||
|
||||
// public function employee(){
|
||||
// return $this->belongsTo(Employee::class,'employee_id');
|
||||
// }
|
||||
public function employee()
|
||||
{
|
||||
return $this->hasOne(Employee::class, 'users_id');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user