If you are using laravel v5.0+ then this will help you for sure.
$originalArr= $model->getOriginal('arg1');
getOriginal() method is intended to bring original value of the attribute, which was loaded from the db. Also note that, If you change the value it will not work!
In such cases, For good practices, you may need
$originalArr= $model->setSomeArg('arg2');
This will preserve value in the $originalArr array.
Mahmoud Santos Date : 2022-02-23
Best answers
2
Best answers
2
You can try this I hope this will help you.
Also, you can do this if you like to get attributes only.
Yasen Sayed Date : 2022-02-23
Oh, How interesting it's worked successfully.
Thanks a lot
Shilpa Date : 2022-02-26
Best answers
10
Best answers
10
If you are using laravel v5.0+ then this will help you for sure.
getOriginal() method is intended to bring original value of the attribute, which was loaded from the db. Also note that, If you change the value it will not work!
In such cases, For good practices, you may need
This will preserve value in the $originalArr array.