31 lines
657 B
PHP
31 lines
657 B
PHP
<?php
|
|
// app/Models/Template.php
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Template extends Model
|
|
{
|
|
protected $fillable = ['nama_template', 'kategori_id', 'fitur_id', 'foto', 'harga'];
|
|
|
|
public function kategori() {
|
|
return $this->belongsTo(Kategori::class);
|
|
}
|
|
|
|
public function fitur() {
|
|
return $this->belongsTo(Fitur::class);
|
|
}
|
|
|
|
public function pernikahan() {
|
|
return $this->hasOne(Pernikahan::class);
|
|
}
|
|
|
|
public function ulangTahun() {
|
|
return $this->hasOne(UlangTahun::class);
|
|
}
|
|
|
|
public function khitan() {
|
|
return $this->hasOne(Khitan::class);
|
|
}
|
|
}
|