withTrashed()`); a live one is not in the trash, and is * a 404. * * Part of the product module, written by make:crud. */ class ProductTrashController extends Controller { /** * Permanently delete the specified resource from the trash. */ #[Authorize('forceDelete', 'product')] public function destroy(Product $product, ForceDeleteProduct $action): RedirectResponse { abort_unless($product->trashed(), 404); // The action logs the entry, links it, and words a foreign-key refusal. $action->handle($product); Inertia::flash('toast', ['type' => 'success', 'message' => __('crud.force_deleted')]); return to_route('product.index', ['filter' => ['trashed' => 'only']]); } }