Inheritance: extends Illuminate\Database\Eloquent\Builder
Example #1
0
 /**
  * Overriding newQuery() to the custom UserBuilder with some interesting methods.
  *
  * @param bool $excludeDeleted
  *
  * @return Corcel\UserBuilder
  */
 public function newQuery()
 {
     $builder = new UserBuilder($this->newBaseQueryBuilder());
     $builder->setModel($this)->with($this->with);
     $builder->orderBy('user_registered', 'desc');
     return $builder;
 }