29 lines
523 B
PHP
29 lines
523 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Buket extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'bukets';
|
|
protected $primaryKey = 'id_buket';
|
|
|
|
protected $fillable = [
|
|
'nama',
|
|
'deskripsi',
|
|
'harga',
|
|
'foto',
|
|
'kategori', // Enum
|
|
'ukuran', // Enum
|
|
];
|
|
|
|
public function transaksi()
|
|
{
|
|
return $this->hasMany(TransaksiBuket::class, 'id_buket');
|
|
}
|
|
}
|