php - How to solve the 'MethodNotAllowedHttpException' error in laravel? -


i have got error

methodnotallowedhttpexception

when using 'post' in route:

route::post('seedetail', [         'uses' => 'datacontroller@seedetail',         'as' => 'seedetail'         ]); 

but, if using 'get' in route, there's no error have data_id in link (localhost/survey/public/seedetail?data_id=1).
know how make data_id disappear link (localhost/survey/public/seedetail)?

button in view this:

<a href="{{ route('seedetail', ['data_id'=>$getdata->data_id])}}" class="btn btn-default"> 

you send get request not post request. need use get instead of post. pass parameter in url don't specify in route.

try this:

route::get('seedetail/{data_id}', [     'uses' => 'datacontroller@seedetail',     'as' => 'seedetail' ]); 

docs


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -