Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel override eloquent all function

public static function all($columns = array('*'))
    {
        $columns = is_array($columns) ? $columns : func_get_args();

        $instance = new static;

        return $instance->newQuery()->where('account_type', '!=', 'SuperAdmin')->get($columns);
    }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #laravel #override #eloquent #function
ADD COMMENT
Topic
Name
9+6 =