I have two request sample and incomplete sample, I get the complete sample by submitting the form without ticking any checkbox, then get incomplete samples by clicking the checkbox.
I can get incomplete samples by ticking the checkbox. I get the error while getting the complete samples.
if(!in_array($sample, $request->pending)){
$tests = Session('tests');
$createSample = Sample::create([
'test_user_id' => $request->test_user_id,
'received_by' => (integer)$request->received_by,
'received_at' => $now,
'received_name' => $request->received_name,
'biobank' => $request->biobank,
'order_id' => $request->order_id,
'order_type' => $request->order_type,
'name' => $request->name,
]);