first commit

This commit is contained in:
2026-05-14 09:08:09 +08:00
commit 919b86c8ec
111 changed files with 14085 additions and 0 deletions

67
app/Models/User.php Normal file
View File

@@ -0,0 +1,67 @@
<?php
namespace App\Models;
// use Illuminate\Contracts\Auth\MustVerifyEmail;
use Database\Factories\UserFactory;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Spatie\Permission\Traits\HasRoles;
class User extends Authenticatable
{
/** @use HasFactory<UserFactory> */
use HasFactory, HasRoles, Notifiable;
/**
* The attributes that are mass assignable.
*
* @var list<string>
*/
protected $fillable = [
'name',
'email',
'no_telefon',
'jawatan',
'jabatan_id',
'status',
'last_login_at',
'password',
];
/**
* The attributes that should be hidden for serialization.
*
* @var list<string>
*/
protected $hidden = [
'password',
'remember_token',
];
/**
* Get the attributes that should be cast.
*
* @return array<string, string>
*/
protected function casts(): array
{
return [
'email_verified_at' => 'datetime',
'last_login_at' => 'datetime',
'status' => 'boolean',
'password' => 'hashed',
];
}
public function jabatan()
{
return $this->belongsTo(Jabatan::class, 'jabatan_id');
}
public function permohonan()
{
return $this->hasMany(Permohonan::class);
}
}