Column not found: 1054 Unknown column '_method' in 'field list'
Getting the above unknown column error for _method and _token but I have $fillable set in my model. What could be causing the error? I know the solution is Input::except('_method') in my controllers but I would like to understand the context of the issue. Here is my code
protected $table = 'personaldetails';
protected $fillable = [
'address',
'city',
'country',
'postcode',
];
The relavant top part of my blade form...
<form action="{{ route('students.update', [$student->id]) }}" method="POST">
<input type="hidden" name="_method" value="PUT">
<input type="hidden" value="{{ Session::token() }}" name="_token">
<div class="row">
also tried with laravel { { csrf_field() } }.
public function update(Request $request, $id)
{
$inputData = $request->all();
$Student = Student::find($id);
$Student->personaldetail()->update($inputData);
return redirect()->route('Student.index')->with('message','Studenthas been updated'); }
Anyone else come across this too?