Delete a Record intentionally with relationships
Hey everyone.
So, I want to manually take care of a record deletion.
There's a few relationships involved, and I want to use DB::transactions. I know I could use an Observer, but that's not explicit and I believe it won't use transactions.
My only issue is that after deleting the record, it doesn't navigate away. It seems it tries to reload the page before redirecting, and of course, the model is already gone by that time, and I get a 404, instead of a redirect.
Here is the code I'm using on a custom action (tried to customize a
DeleteAction
before, but similar result.
Thanks for any tips!
6 Replies
Is this page index or edit?
edit
hey!
What about a custom delete action?
Hey Leandro!
I tried it, not working
hum.. are you able to create a mini repo on Github to reproduce this issue?
Sure, I'll send you privately the current one