attachments()->get(); } public function auction() { return $this->hasMany(Auction::class ,'tender_category_id'); } function attachments(){ return $this->morphMany(Attachment::class,'attachmentable'); } public $adminFields=[ 'image'=>[ 'type'=>'photo', 'fa_name'=>'عکس ', 'col'=>12, 'required'=>false, 'data'=>[] ], 'title'=>[ 'type'=>'string', 'fa_name'=>'عنوان', 'col'=>12, 'required'=>true, 'data'=>[] ], 'description'=>[ 'type'=>'string', 'fa_name'=>'توضیحات', 'col'=>12, 'required'=>true, 'data'=>[] ], ]; }