Here,what i want is when i press delete button necessary raw need to be deleted.that means relevant trainee_id and its details need to be deleted.
Here is the controller i`m using for that.
public function admin_destroy($trainee_id)
{
registerdetails::where('trainee_id','=',$trainee_id)->first()->destroy();
}
Here is the route.
Route::get('Delete/{trainee_id?}', 'UserRegisterController@admin_destroy')
->where('trainee_id', '(.*)');;`
Here is the view button for delete.
<td>
<a class="btn btn-danger" href="Delete/{{ $item->trainee_id }}">Delete</a>
</td>
Here is the URL um getting when i press the delete button.
http://127.0.0.1:8000/Delete/MOB/TR/1739
Finally this the error i`m getting.
Can anyone suggest me to fix this error.