Closed jscrobinson closed 7 years ago
Your code is only compatible with >= 5.3.19.
Check out #42, where I fixed the same issue, but in a way that is compatible with all of 5.3.*.
Thanks @torkiljohnsen, I'd forgotten to pass the $ids parameter to the parent method.
@jimrobinson-croud Actually, no: By passing the $ids
parameter to the parent method, your code will only work with Laravel >= 5.3.19, since it's only in 5.3.19 and above that the parent method will accept the second parameter.
By not passing the $ids
parameter, the code will work with all Laravel 5.3 versions. The parent method will just assume an empty array.
Actually, parent::setModel($model);
could just be replaced with $this->model = $model;
. Less overhead.
Good point. Thanks again @torkiljohnsen
Fix for https://github.com/HipsterJazzbo/Landlord/issues/39