I try all the way but not show user_id and image_id in the table
This is model view of post
protected $fillable = ['title','category','description','name','phone','city'];
public function image()
{
return $this->hasMany('App\Image');
}
public function user(){
return $this->belongsTo('App\User');
}
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire