Yasen Sayed Published in : 2022-02-23
Hello guys, Please anyone can help me to get the original attribute in Laravel?
Mahmoud Santos Date : 2022-02-23
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
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.
Please Login or sign up to be able to write comment
Join our community and get the chance to solve your code issues & share your opinion with us