protected function addActivate(Builder $builder): void
    {
        $builder->macro('activate', function (Builder $builder) {
            $builder->withNotActivated();

            return $builder->update(['is_active' => 1]);
        });
    }
protected function addActivate(Builder $builder): void
    {
        $builder->macro('activate', function (Builder $builder) {
            $builder->withNotActivated();

            return $builder->update(['is_active' => 1]);
        });
    }
protected function addActivate ( Builder $ builder ) : void { $ builder -> macro ( 'activate' , function ( Builder $ builder ) { $ builder -> withNotActivated ( ) ; return $ builder -> update ( [ 'is_active' => 1 ] ) ; } ) ; }
Add the `activate` extension to the builder.

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