I want to check if the model has been changed with isDirty method, but always returns false.
This is my code :
if (!is_null($partnersData)) {
foreach ($partnersData as $partnerData) {
$partner = Partner::find($partnerData['partner_id']);
$partner->update($partnerData);
if($partner->isDirty()){
dd('true');
}
}
}
updated_at
timestamp on yourpartner
table? – Dynode