Init: Hoan thanh kien truc V3 va Filament UI

This commit is contained in:
2026-04-18 02:07:30 +00:00
commit 761b34916b
141 changed files with 15917 additions and 0 deletions

27
app/Models/Customer.php Normal file
View File

@@ -0,0 +1,27 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Concerns\HasUuids;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Customer extends Model
{
use HasUuids, HasFactory;
protected $guarded = [];
// Ép kiểu để Laravel tự động dịch JSON thành Mảng khi hiển thị lên Form
protected $casts = [
'address' => 'array',
'dob' => 'date',
];
public function contracts()
{
return $this->belongsToMany(Contract::class, 'contract_customers')
->withPivot('role', 'transfer_order')
->withTimestamps();
}
}