Getting cURL error 3: <url> malformed (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) error after saving models in laravel 5.4

I am cURL error 3: <url> malformed (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)

getting this error after saving / creating multiple models in the 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'); 
}

      

These models persist successfully in the database, but then move on to the problem cURL error 3

. What is causing this error based on codes? Please advise. Thank.

+3


source to share


1 answer


This error is due to an invalid URL. Check cURL error 3: link enter link description here



+2


source







All Articles