skip to Main Content

Laravel 11 delete item with Bootstrap 5 modal – response is string, not object

web.php: Route::delete('/roles/{id}/delete', [RoleController::class, 'delete'])->name('roles.delete'); RoleController.php: public function delete($id): string { $data = [ 'id' => $id ]; return response()->json($data, 200); } index.blade.php: <a href="{{ route('roles.delete', $role->id) }}" class="btn btn-danger btn-xs btn-action" data-bs-toggle="tooltip" data-bs-custom-class="ls-tooltip" title="{{ __('Delete') }}" data-action-message="{{ __('Delete this role?')…

VIEW QUESTION

Html – Can't get modal to display type and image of Pokemon

HTML: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>My First JS App</title> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"> <link rel="stylesheet" type="text/css" href="css/styles.css"> </head> <body> <header class = "page-header"> <img src = "img/PokemonLogo.svg" alt = "Pokemon Logo" class = "logo"> </header>…

VIEW QUESTION
Back To Top
Search