Skip to content

Commit

Permalink
make all redirect https
Browse files Browse the repository at this point in the history
  • Loading branch information
slayer321 committed Oct 26, 2023
1 parent 9607a95 commit 677dfa9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
5 changes: 3 additions & 2 deletions src/resources/views/edit-todo.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">

<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
Expand All @@ -15,11 +16,11 @@
<h2>Edit Todo</h2>
</div>

<form method="POST" action="{{route('update',['id'=>$todo->id])}}">
<form method="POST" action="{{route('/update',['id'=>$todo->id])}}">

@csrf

{{ method_field('PUT') }}
@method('PUT')

<div class="row justify-content-center mt-5">

Expand Down
5 changes: 3 additions & 2 deletions src/resources/views/todo.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">

<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
Expand Down Expand Up @@ -56,8 +57,8 @@
@endif
</td>
<td>
<a href="{{route('edit',['id'=>$todo->id])}}" class="btn btn-info">Edit</a>
<a href="{{route('destroy',['id'=>$todo->id])}}" class="btn btn-danger">Delete</a>
<a href="{{route('/edit',['id'=>$todo->id])}}" class="btn btn-info">Edit</a>
<a href="{{route('/destroy',['id'=>$todo->id])}}" class="btn btn-danger">Delete</a>
</td>
</tr>

Expand Down
6 changes: 3 additions & 3 deletions src/routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
Route::get('/', [TodoController::class, 'index'])->name('index');
Route::get('/create', [TodoController::class, 'create']);
Route::post('/store', [TodoController::class, 'store'])->name('store');
Route::get('/edit/{id}', [TodoController::class, 'edit'])->name('edit');
Route::put('/update/{id}', [TodoController::class, 'update'])->name('update');
Route::get('/destroy/{id}', [TodoController::class, 'destroy'])->name('destroy');
Route::get('/edit/{id}', [TodoController::class, 'edit'])->name('/edit');
Route::put('/update/{id}', [TodoController::class, 'update'])->name('/update');
Route::get('/destroy/{id}', [TodoController::class, 'destroy'])->name('/destroy');

0 comments on commit 677dfa9

Please sign in to comment.