delete / forceDelete bug
ctf0 opened this issue · 0 comments
ctf0 commented
so for example in model
public function getIdAttribute($value)
{
return app('optimus')->encode($value);
}
and in the controller
public function destroy($id)
{
Post::find(app('optimus')->decode($id))->delete();
// or
Post::withTrashed()->find(app('optimus')->decode($id))->forceDelete();
}
all other operations works without an issue get, update, show, etc..
, but for some reason when trying to delete the item, it doesnt get reflected in the db, even that both delete
& forceDelete
return true.
using plain ids works as expected, but when used by optimus
i have no luck 😢 .
have anyone encountered such an issue b4 ? or what might be the solution for it ?