laravel/framework — pull request #5878 by HipsterJazzbo (2014-09-27 22:27:27+00:00)
Title: Update ScopeInterface w/ tests

Since time immemorial, `Model::appleGlobalScopes()` has been passing in the model as a second parameter to `$scope::apply()` (and `$scope::remove()`), but `ScopeInterface` didn't have that parameter specified so it couldn't be used. This fixes that.

Now instead of this:

```php
public function apply(Builder $builder)
{
$model = $builder->getModel();

//... other stuff
}
```

You now do this:

```php
public function apply(Builder $builder, Model $model)
{
//... just do stuff
}
```

I've also updated `SoftDeletingScope`, and updated the tests.

I've made this PR against `master` because this is a breaking change (it requires you to update your implementations of `apply()` and `remove()`).