initial commit

This commit is contained in:
2026-09-23 12:45:02 +07:00
parent d16f454083
commit 507fc6ccdf
235 changed files with 19587 additions and 2835 deletions
+24 -2
View File
@@ -6,5 +6,27 @@ use Illuminate\Database\Eloquent\Model;
class WeightHistory extends Model
{
//
}
// Pastikan fillable sesuai dengan kolom di database
protected $fillable = [
'cat_id',
'berat',
'tanggal_timbang', // Pastikan baris ini ada
'created_at',
'updated_at'
];
protected function casts(): array
{
return [
'tanggal_timbang' => 'date',
'berat' => 'decimal:2',
];
}
public function cat()
{
return $this->belongsTo(Cat::class);
}
}