Soft Deleting Relations
When two related models have soft deletes enabled, you can cascade the delete event by defining the softDelete option in the relation definition. In this example, if the user model is soft deleted, the comments belonging to that user will also be soft deleted.
class User extends Model
{
use \October\Rain\Database\Traits\SoftDelete;
public $hasMany = [
'comments' => [\Acme\Blog\Models\Comment::class, 'softDelete' => true]
];
}
On https://docs.octobercms.com/3.x/extend/database/traits.html#soft-deleting-relations
it says:
Soft Deleting Relations When two related models have soft deletes enabled, you can cascade the delete event by defining the softDelete option in the relation definition. In this example, if the user model is soft deleted, the comments belonging to that user will also be soft deleted.
But on the linked https://docs.octobercms.com/3.x/extend/database/relations.html no softDelete argument is listed. Only delete. I guess softDelete should get mentioned there as well (?)