withTrashed()`); a live one is not in the trash, and is a * 404. * * Part of the product module, written by make:crud. */ class ProductRestoreController extends Controller { /** * Restore the specified resource from the trash. */ #[Authorize('restore', 'product')] public function update(Product $product, RestoreProduct $action): RedirectResponse { abort_unless($product->trashed(), 404); $action->handle($product); Inertia::flash('toast', ['type' => 'success', 'message' => __('crud.restored')]); return to_route('product.index', ['filter' => ['trashed' => 'only']]); } }