whats this line:
ErrorException in helpers.php line 671: (post all of that function).
I am assuming that the parameters to the function Form::text may need swapping..
What i would do if i were you is, get rid (or comment) all the form::text except for one..
Hi sir.
this is what on my helpers.php line 671;
668 function str_replace_array($search, array $replace, $subject)
669 {
670 foreach ($replace as $value) {
671 $subject = preg_replace('/'.$search.'/', $value, $subject, 1);
672 }
673
674 return $subject;
675 }
676 }
I think It has something to do with the controller ?
here is my controller store method
public function store(AssetRequest $request)
{
$product = Auth::user()->products()->create($request->all());
$imageName = $product->id . '.' .
$request->file('image')->getClientOriginalExtension();
$request->file('image')->move(
base_path() . '/public/images/product/', $imageName
);
$product->domains()->attach($request->input('domain_list'));
$product->manufactures()->attach($request->input('manufacture_list'));
$product->packs()->attach($request->input('pack_list'));
$product->status()->attach($request->input('statu_list'));
$product->systems()->attach($request->input('system_list'));
$product->technicians()->attach($request->input('technician_list'));
$product->types()->attach($request->input('type_list'));
$product->versions()->attach($request->input('version_list'));
$product->serials()->attach($request->input('serial_list'));
$product->flashdrives()->attach($request->input('flashdrive_list'));
$product->parallels()->attach($request->input('parallel_list'));
$product->ethernets()->attach($request->input('ethernet_list'));
$product->wifis()->attach($request->input('wifi_list'));
$product->officers()->attach($request->input('officer_list'));
$product->terms()->attach($request->input('term_list'));
$product->postatus()->attach($request->input('postatu_list'));
$product->departments()->attach($request->input('department_list'));
$product->clasifications()->attach($request->input('clasification_list'));
$product->phones()->attach($request->input('phone_list'));
$product->receives()->attach($request->input('receive_list'));
$product->disposals()->attach($request->input('disposal_list'));
return redirect('assets');
}
what function should I put to make this work ,,
Thank you again
I had this issue but managed to resolve it by using json_encode
. It appears that the issue is caused when trying to save a field that is an array value.
$fieldData = ['hello' => 'world'];
$fieldData = json_encode($fieldData);
Hope it helps!
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community