25 lines
503 B
PHP
25 lines
503 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class Dokumentasi extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'dokumentasi';
|
|
|
|
protected $fillable = [
|
|
'kegiatan_id',
|
|
'file_dokumentasi',
|
|
'keterangan',
|
|
];
|
|
|
|
public function kegiatan(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Kegiatan::class, 'kegiatan_id');
|
|
}
|
|
} |