protected function addUndoPublish(Builder $builder): void
    {
        $builder->macro('undoPublish', function (Builder $builder) {
            return $builder->update(['is_published' => 0]);
        });
    }
protected function addUndoPublish(Builder $builder): void
    {
        $builder->macro('undoPublish', function (Builder $builder) {
            return $builder->update(['is_published' => 0]);
        });
    }
protected function addUndoPublish ( Builder $ builder ) : void { $ builder -> macro ( 'undoPublish' , function ( Builder $ builder ) { return $ builder -> update ( [ 'is_published' => 0 ] ) ; } ) ; }
Add the `undoPublish` extension to the builder.

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