I am having this error cURL error 3: <url> malformed (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
after saving/creating multiple models to database.
I have this in my controller:
public function storeTruck(Request $request){
//Save Company Detail
$company = Company::Create($request->only(['company']));
// Save Trucker Info
$request->request->add(['password'=>bcrypt('trucker')]);
$request->request->add(['company_id'=>$company->id]);
$trucker = Trucker::create( $request->only([
'first_name','last_name','company',
'email','contact', 'password', 'company_id'
]));
return view('admin.truck.list');
}
Those models are saved successfully in database but it will then proceed to a cURL error 3
problem. What causes this error based on the codes? Please advice. Thanks.