public static function onlyTrashed()
 {
     $instance = new static();
     $column = $instance->getQualifiedDeletedAtColumn();
     return $instance->newQueryWithDeleted()->whereNotNull($column);
 }
Пример #2
0
 /**
  * Get a new query builder that only includes soft deletes.
  *
  * @return \Illuminate\Database\Eloquent\Builder
  */
 public static function onlyTrashed()
 {
     $instance = new static();
     $column = $instance->getQualifiedDeletedAtColumn();
     return $instance->newQueryWithDeleted()->where($column, array('$ne' => null));
 }