*/ use HasFactory, SoftDeletes; /** * Get the user that made this listing. */ public function poster(): BelongsTo { return $this->belongsTo(User::class, 'user_id'); } /** * The attributes that are mass assignable. * * @var list */ protected $fillable = [ 'title', 'description', 'price', 'location', 'condition', 'user_id', ]; /** * The attributes that should be hidden for serialization. * * @var list */ protected $hidden = [ 'user_id', 'deleted_at', ]; }