Ok, so I have dug around LC and SO and have learned that I need to initialise the declared values before their use. This is odd, as I am getting this only on my development system and not on the production system running on DO.
any way, no matter - ok, so I think, I followed the pattern seen elsewhere on LC. Indeed, the initialisation error has disappeared. But now I have a different error, which I am sure stems from the original error. The console show me that the data is empty however I do have a 200 status. Note: the $request data is coming off of Vue 2.6 and indeed is being passed as I can see in Vue tools. So - bottom line, I suspect that I should not be initialising it against new child. Any suggestions on how I can get this right? Many thanks !
Laravel Controller:
public function upDateChild(Request $request)
{
$request->child_id = new child; // Added this
$request->status = new child; // Added this
DB::table('child')
->where('child_id', $request->child_id)
->update(['status' => $request->status]);
BLAH BLAH BLAH
}
Console
{data: '', status: 200, statusText: 'OK', headers: {…}, config: {…}, …}config: {transitional: {…}, transformRequest: Array(1), transformResponse: Array(1), timeout: 0, adapter: ƒ, …}data: ""headers: {cache-control: 'no-cache, private', connection: 'keep-alive', content-encoding: 'gzip', content-type: 'text/html; charset=UTF-8', date: 'Sun, 24 Jul 2022 01:11:15 GMT', …}request: XMLHttpRequest {onreadystatechange: null, readyState: 4, timeout: 0, withCredentials: false, upload: XMLHttpRequestUpload, …}status: 200statusText: "OK"[[Prototype]]: Object