morphMany(Attachment::class,'attachmentable'); } public function getAttachmentsAttribute() { return $this->attachments()->get(); } public $adminFields=[ 'image'=>[ 'type'=>'photo', 'fa_name'=>'عکس ', 'col'=>12, 'required'=>false, 'data'=>[] ], 'name'=>[ 'type'=>'string', 'fa_name'=>'نام', 'col'=>6, 'required'=>true, 'data'=>[] ], 'education'=>[ 'type'=>'string', 'fa_name'=>'تحصیلات', 'col'=>6, 'required'=>true, 'data'=>[] ], 'description'=>[ 'type'=>'string', 'fa_name'=>'توضیحات', 'col'=>12, 'required'=>false, 'data'=>[] ], ]; }