'datetime', 'password' => 'hashed', ]; } // Add this relationship method public function user(): BelongsTo { return $this->belongsTo(User::class); } // Automatically resolve routes by slug public function getRouteKeyName() { return 'slug'; } // Scope to filter out expired pastes globally protected static function booted() { static::addGlobalScope('active', function (Builder $builder) { $builder->where(function ($query) { $query->whereNull('expires_at') ->orWhere('expires_at', '>', now()); }); }); } }