Inheritance: extends Illuminate\Database\Eloquent\Builder
Beispiel #1
0
 /**
  * Override the parent newQuery() to the custom CommentBuilder class
  * 
  * @param bool $excludeDeleted
  * @return \Corcel\CommentBuilder
  */
 public function newQuery($excludeDeleted = true)
 {
     $builder = new CommentBuilder($this->newBaseQueryBuilder());
     $builder->setModel($this)->with($this->with);
     if ($excludeDeleted and $this->softDelete) {
         $builder->whereNull($this->getQualifiedDeletedAtColumn());
     }
     return $builder;
 }