added AuthController and StaffMember model, update auth config and routes

This commit is contained in:
Kwesi Banson Jnr
2026-07-17 21:10:38 +00:00
parent 4bf2ac98f8
commit 266c0ff097
5 changed files with 106 additions and 18 deletions

View File

@@ -0,0 +1,30 @@
<?php
namespace App\Models;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class StaffMember extends Authenticatable
{
use HasFactory, Notifiable;
// 1. Explicitly define the custom table name
protected $table = 'staff_members';
// 2. Define the fillable fields based on your schema
protected $guarded = ['id'];
// 3. Hide the password from array/JSON conversions
protected $hidden = [
'password',
];
// 4. Cast dates correctly
protected $casts = [
'dob' => 'date',
'hire_date' => 'datetime',
'password' => 'hashed', // Laravel 10+ password casting
];
}