We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add behavior similar to SET NULL action. It will set relation column to NULL when referenced model is deleted.
SET NULL
For example
Class User extends Model { use SoftDeletes, SoftCascadeTrait; protected $softCascade = ['phone@setNull']; public function phone() { return $this->hasOne(Phone::class); } } Class Phone extends Model { use SoftDeletes; public function user() { return $this->belongsTo(User::class); } }
Will set NULL in phones.user_id if user was soft deleted.
phones.user_id
The text was updated successfully, but these errors were encountered:
You are free to make a PR with the improvement. I'm not using package anymore and only I will review PR's.
Sorry, something went wrong.
No branches or pull requests
Add behavior similar to
SET NULL
action. It will set relation column to NULL when referenced model is deleted.For example
Will set NULL in
phones.user_id
if user was soft deleted.The text was updated successfully, but these errors were encountered: