0
votes

route.php

Route::get('users/{id}', array( 'as' => 'crm_user_info', 'uses' => 'CrmController@fetch_user_info' ));

Route::post('users/{id}', array( 'as' => 'manage_crm_notes', 'uses' => 'CrmController@validate_crm_user_info' ));

CrmController.php

fetch_user_info function normally fetching the data and validate_crm_user_info function is normally validating and saving the data.

index.blade.php

{{ Form::open(array('url'=> route('manage_crm_notes', $data->account_id),'method'=>'POST')) }} {{Form::file('documents[]', array('multiple'=>true))}} {{ Form::submit("Save", array('class'=>'btn btn-green btn-icon')) }} {{ Form::close() }}

In view file there is one textarea and one file input is used with submit button.

Everything is working fine until I submit "Test"/"test" word. It gives me "406 Not Acceptable" error. Similar code is working fine on local server but on main server its gives me error. Please enlighten me what are the reason for this error.

Through google found this code.

SecFilterEngine Off

Still getting this error!! :/

1
what value is assigned to id in your route in the form action?Luceos
Users unique id (integer)user3157150

1 Answers

0
votes

When sending files, remember to set files=true in your Form::open() options.

{{ Form::open(array('url'=> route('manage_crm_notes', $data->account_id),'method'=>'POST', 'files'=>true)) }} 
{{Form::file('documents[]', array('multiple'=>true))}} 
{{ Form::submit("Save", array('class'=>'btn btn-green btn-icon')) }} 
{{ Form::close() }}