Access Relationship Input in mutateFormDataBeforeCreate()

Hello, I want to access the relationship inputs in the mutateFormDataBeforeCreate() method, but I can only access the non-relationship inputs. How to do that?

protected function mutateFormDataBeforeCreate(array $data): array
{
  $data['cashier_id'] = auth()->id();
  return $data;
}


// Data Result
[
  "discount" => 10 // from TextInput
  "cashier_id" => "01ha16anrawwd9pknhfy3g43yx"
]
Solution
Try dd($this->data), see if the input you want is there
Was this page helpful?