Skip to content
This repository has been archived by the owner on Jul 16, 2023. It is now read-only.

Fix soft deleted doesn't work when upgraded Laravel 4.2 #212

Closed
wants to merge 7 commits into from
Closed
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 8 additions & 13 deletions src/LaravelBook/Ardent/Ardent.php
Original file line number Diff line number Diff line change
Expand Up @@ -865,14 +865,14 @@ public static function find($id, $columns = array('*')) {
return parent::find($id, $columns);
}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whitespace! :(

/**
* Get a new query builder for the model's table.
* Overriden from {@link \Model\Eloquent} to allow for usage of {@link throwOnFind}.
*
* @param bool $excludeDeleted
* @return \Illuminate\Database\Eloquent\Builder
*/
* Get a new query builder for the model's table.
* Overriden from {@link \Model\Eloquent} to allow for usage of {@link throwOnFind}.
*
* @param bool $excludeDeleted
* @return \Illuminate\Database\Eloquent\Builder
*/
public function newQuery($excludeDeleted = true) {
$builder = new Builder($this->newBaseQueryBuilder());
$builder->throwOnFind = static::$throwOnFind;
Expand All @@ -882,11 +882,6 @@ public function newQuery($excludeDeleted = true) {
// while it is constructing and executing various queries against it.
$builder->setModel($this)->with($this->with);

if ($excludeDeleted and $this->softDelete)
{
$builder->whereNull($this->getQualifiedDeletedAtColumn());
}

return $builder;
return $this->applyGlobalScopes($builder);
}
}