*/ protected $fillable = [ 'tenant_id', 'image_path', 'caption', 'uploaded_by', 'display_order', ]; /** * The attributes that should be cast. * * @var array */ protected $casts = [ 'display_order' => 'integer', ]; /** * Get the club that owns the image. */ public function tenant(): BelongsTo { return $this->belongsTo(Tenant::class); } /** * Get the user who uploaded the image. */ public function uploader(): BelongsTo { return $this->belongsTo(User::class, 'uploaded_by'); } }