Welcome Guest, Not a member yet? Register   Sign In
Missing data in $beforeUpdate callback function
#1

Hello! 
I try to create a
Code:
$beforeUpdate
 callback function to change date format for database:
Code:
protected $beforeUpdate = ['changeDateFormat'];

And when i try to check the incoming data, then i see that many fields are missing:
Code:
public function changeDateFormat(array $data)
{
        dd($data['data']);
}
It has only three fields: [id, fk_loan_id, updated_at], but it should have many more fields, like: base_data, loan_balance etc. 
Why can't i see all the values and how can i fix it?

Thank you for any help!
Reply


Messages In This Thread
Missing data in $beforeUpdate callback function - by JoosepK - 04-27-2023, 07:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB