enhanced services attachment

This commit is contained in:
Fiqh Pratama
2025-10-13 10:55:21 +07:00
parent 65d176e6b2
commit dd5dbcab8f
9 changed files with 184 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class AttachmentForm extends Model
{
use SoftDeletes;
protected $table = 'attachment_form';
protected $fillable = [
'form_id',
'table_name',
'file_category',
'file_path',
];
/**
* Relasi dinamis ke table form terkait
*/
public function form()
{
return $this->morphTo(__FUNCTION__, 'table_name', 'form_id');
}
}