Closed innocenzi closed 3 years ago
The same thing is true of deleting a contact! =)
Good catch, I accidentally forgot to replace the previous logic that allowed route model binding of trashed models. This has been fixed: eb00e058d2718909a21b27efc83d714cabc937dd
Sorry for commenting on an old issue.
The resolveRouteBinding
on every Model class is not necessary and also causes it not to work properly because other resource routes like show
, edit
and update
will resolve deleted models.
You can just use withTrashed()
in restore routes like this:
Route::put('users/{user}/restore', [UsersController::class, 'restore'])
->name('users.restore')
->withTrashed()
->middleware('auth');
Which causes a 404 modal to appear, since the organization doesn't exist anymore.