$documentable_type Class of the category or tag. * @property-read \Carbon\Carbon $created_at Created date of the document. * @property-read \Carbon\Carbon $updated_at Updated date of the document. */ class Documentable extends MorphPivot { /** * The table associated with the model. * * @var string|null */ protected $table = 'documentables'; /** * Perform any actions required after the model boots. * * @return void */ protected static function booted(): void { static::created(fn() => Document::resetCache()); static::updated(fn() => Document::resetCache()); static::deleted(fn() => Document::resetCache()); } }