Closed sebastiaanluca closed 8 years ago
Thanks for reporting.
I will try to find a workaround to be able to use it along with SoftDeletes
.
About $forceDeleting
you are right, it is useless :)
@hootlex Used SoftDeletes::performDeleteOnModel insteadof Moderatable;
in my model to favor the soft delete method. I think I can get away with this as Moderatable just finds it without scope and force deletes it.
The only thing that's keeping me from using soft delete now is that $forceDeleting
variable :) Should I fork this library and use that or are you able to quickly delete that line and push to packagist?
I have removed the unused variable in v1.0.4.
The only reason performDeleteOnModel
exists is to achieve compatibility with Laravel 5 (https://github.com/hootlex/laravel-moderation/pull/1) but I consider removing it.
Can you provide more details about SoftDeletes::performDeleteOnModel insteadof Moderatable
?
Thanks! Updating right now :)
When using both traits, I just make it use the SoftDeletes performDeleteOnModel
method using:
use SoftDeletes, Moderatable {
SoftDeletes::performDeleteOnModel insteadof Moderatable;
}
You are welcome.
Function performDeleteOnModel
has been removed in v1.0.5, so you can use it normally.
Trait method performDeleteOnModel has not been applied, because there are collisions with other trait methods on User
.\Illuminate\Database\Eloquent\SoftDeletes
has the same methodprotected function performDeleteOnModel()
. Can I use these together somehow? Should I just use the method from the soft delete trait?Small update: both traits also define the
$forceDeleting
property, which cannot be rewritten or aliased. Why exactly is it being use? There's no need for it?