attachments()->get(); } public function blog() { return $this->hasMany(Blog::class ,'blog_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'=>[] ], ]; }