-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
Hi,
My controller has,
$Data = Data::findOrFail($id);
$DataData = $request->all();
$Data = $Data->fill($DataData);
Result of dump($DataData)
is below:
array:21 [▼
"_method" => "PATCH"
"_token" => "dfsfsfsdfsdfxfghcgxtydh"
"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"
"source" => "MOW"
"destination" => "AMS"
"departure_date" => "2019-08-29 05:09:50"
"return_date" => null
"booking_status" => "FOLLOW"
"bookings" => array:1 [▼
0 => array:8 [▼
"passenger_first_name" => null
"passenger_last_name" => null
"passenger_age" => null
"passenger_pnr" => "322433"
"ticket_number" => null
"airline_name" => null
"topline" => "0"
"cost" => "0"
]
]
"attachments" => array:1 [▼
0 => null
]
"comment" => null
"comment_created_by" => "1"
"updated_by" => "1"
]
Result of dump($Data)
is below:
Data {#271 ▼
#fillable_relations: array:3 [▼
0 => "bookings"
1 => "comments"
2 => "attachment"
]
#fillable: array:21 [▼
0 => "name_prefix"
1 => "first_name"
2 => "last_name"
3 => "primary_email"
4 => "primary_phone"
5 => "company_name"
6 => "secondary_email"
7 => "secondary_phone"
8 => "country"
9 => "travel_type"
10 => "source"
11 => "destination"
12 => "departure_date"
13 => "customer_type"
14 => "customer_type"
15 => "return_date"
16 => "booking_source"
17 => "booking_status"
18 => "booking_gds"
19 => "supplier_id"
20 => "created_by"
]
#dates: array:4 [▼
0 => "departure_date"
1 => "return_date"
2 => "created_at"
3 => "updated_at"
]
#connection: "mysql"
#table: "Datas"
#primaryKey: "id"
#keyType: "int"
+incrementing: true
#with: []
#withCount: []
#perPage: 15
+exists: true
+wasRecentlyCreated: false
#attributes: array:23 [▶]
#original: array:23 [▶]
#changes: []
#casts: []
#dateFormat: null
#appends: []
#dispatchesEvents: []
#observables: []
#relations: []
#touches: []
+timestamps: true
#hidden: []
#visible: []
#guarded: array:1 [▼
0 => "*"
]
}
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.
Metadata
Metadata
Assignees
Labels
No labels