Open abhimanusharma opened 5 years ago
Hi Abhi,
I'm not entirely sure what the issue is here?
What would you get from the following:
$docket = Docket::findOrFail($id);
dump($docket->toArray());
$docketData = $request->all();
$docket = $docket->fill($docketData);
dump($docket->toArray());
Hi @troelskn ,
I am getting this result:
array:23 [▼
"id" => 1
"name_prefix" => "Mr"
"first_name" => "Abhi"
"last_name" => "Test"
"primary_email" => "pass@test.com"
"primary_phone" => "9999999999"
"company_name" => null
"secondary_email" => "pass2@test.com"
"secondary_phone" => "8888888888"
"country" => "IN"
"travel_type" => "International Flight"
"source" => "MOW"
"destination" => "AMS"
"departure_date" => "2019-08-29 23:15:09"
"customer_type" => "New Customer"
"return_date" => null
"booking_source" => "fb chat"
"booking_status" => "FOLLOW"
"booking_gds" => "Amadeus"
"created_by" => 1
"updated_by" => null
"created_at" => "2019-08-24 03:18:21"
"updated_at" => "2019-08-24 03:18:21"
]
but data is not updating into the database.
You should call $docket->save()
after fill()
to persist data on the database.
Hi,
My controller has,
Result of
dump($DataData)
is below:Result of
dump($Data)
is below:Data was updated earlier using Data::fill() but not updating any information anymore. I believe I have not changed anything in the controller, Model or View related to Data or related Models.