public static function onlyTrashed() { $instance = new static(); $column = $instance->getQualifiedDeletedAtColumn(); return $instance->newQueryWithDeleted()->whereNotNull($column); }
/** * 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)); }