src/SoftDeletingBooleanScope.php
/**
     * Extend the query builder with the needed functions.
     *
     * @param  \Illuminate\Database\Eloquent\Builder  $builder
     * @return void
     */
Extend the query builder with the needed functions.
@param  \Illuminate\Database\Eloquent\Builder  $builder
@return void
Extend the query builder with the needed functions . @param \ Illuminate \ Database \ Eloquent \ Builder $builder @return void
public function extend(Builder $builder)
    {
        foreach ($this->extensions as $extension) {
            $this->{"add{$extension}"}($builder);
        }
        $builder->onDelete(function (Builder $builder) {
            $column = $this->getIsDeletedColumn($builder);
            return $builder->update([
                $column => 1,
            ]);
        });
    }
public function extend ( Builder $ builder ) { foreach ( $ this -> extensions as $ extension ) { $ this -> { " add { $ extension } " } ( $ builder ) ; } $ builder -> onDelete ( function ( Builder $ builder ) { $ column = $ this -> getIsDeletedColumn ( $ builder ) ; return $ builder -> update ( [ $ column => 1 , ] ) ; } ) ; }
Extend the query builder with the needed functions.
Extend the query builder with the needed functions .