protected function addUndoDraft(Builder $builder): void
    {
        $builder->macro('undoDraft', function (Builder $builder) {
            $builder->withDrafted();

            return $builder->update(['drafted_at' => null]);
        });
    }
protected function addUndoDraft(Builder $builder): void
    {
        $builder->macro('undoDraft', function (Builder $builder) {
            $builder->withDrafted();

            return $builder->update(['drafted_at' => null]);
        });
    }
protected function addUndoDraft ( Builder $ builder ) : void { $ builder -> macro ( 'undoDraft' , function ( Builder $ builder ) { $ builder -> withDrafted ( ) ; return $ builder -> update ( [ 'drafted_at' => null ] ) ; } ) ; }
Add the `undoDraft` extension to the builder.

@param \Illuminate\Database\Eloquent\Builder $builder
@return void
Add the undoDraft extension to the builder .