THIS IS MY VIEW CODE
<form method="POST" action="/update">
Task Name:<input type="text" value="{{$task->TaskName}}" name="taskname"><br>
Description:<input type="text" value="{{$task->Description}}" name="description"><br>
Location id:<input type="text" value="{{$task->Location_id}}" name="location_id"><br>
@if($task->status === 1)
Status:<input type="checkbox" checked name="status"><br>
@else
Status:<input type="checkbox" name="status"><br>
@endif
Created at:<input type="" value="{{$task->created_at}}" name="created_at"><br>
Modified at:<input type="date" value="{{$task->updated_at}}" name="modified_at"><br>
<input type="submit" value="update" name="upadte" ><br>
{{csrf_field()}}
</form>
THIS IS MY ROUTE CODE:
Route::get('/update', 'TasksController@update');
THIS IS MY CONTROLLER CODE FOR UPDATE:
public function update()
{
dd("yoo");
//return view('/update');
}
Route::post('/update', 'TasksController@update');
– Quynh Nguyen