Laravel No Message Symfony Component HttpKernel Exception MethodNotAllowedHttpException
When i edit my projects it give me this error . please help . im stuck. how do i know where is the error. then maybe i can fix it.
This is my edit.blade.php
<form method="post" action="">
/datas/
<div class="form-group">
<input type="submit" class="btn btn-primary" value="Submit"/>
</div>
ProjectController
public function update($id, Request $request)
{
$this->validate($request, [
'company_id' => 'required',
'position_id' => 'required',
'bner' => 'required',
'poz_id' => 'required',
'hner' => 'required',
'document_id' => 'required',
'bbner' => 'required',
'ddate' => 'required',
'bdugaar' => 'required',
'batalgaatdate' => 'required',
'version' => 'required',
'burtgel' => 'required',
'aner' => 'required',
'adugaar' => 'required',
'batlagdsan' => 'required',
'batdate' => 'required',
'btushaal' => 'required',
'date' => 'required',
]);
$postData = $request->all();
Post::find($id)->update($postData);
Session::flash('success_msg', 'Project updated successfully!');
return redirect()->route('projects.index');
}
web.php
Route::get('/projects/edit/{id}','ProjectsController@edit')->name('projects.edit');
from Laravel Questions and Answers https://laravelquestions.com/laravel/laravel-no-message-symfony-component-httpkernel-exception-methodnotallowedhttpexception/
via Lzo Media
No comments:
Post a Comment