Undangan/backend-baru/app/Models/Pelanggan.php
2025-10-02 14:20:41 +07:00

34 lines
589 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Pelanggan extends Model
{
use HasFactory;
protected $table = 'pelanggans';
protected $fillable = [
'nama_pemesan',
'email',
'no_tlpn',
'template_id',
'form',
'harga',
'status',
];
protected $casts = [
'form' => 'array',
'harga' => 'decimal:2',
];
public function template()
{
return $this->belongsTo(Template::class, 'template_id');
}
}