cac
1 year ago
220
9
Laravel

Laravel 5.2.29 getOriginal() not working

Posted 1 year ago by cac

This is not working and I have no idea why. It doesn't change to the original value instead it remains the as set in the accessors.

 foreach ($data as $d){
            $t = $d->getOriginal('created_at'); // this works fine
            $d->created_at = $t; //this makes no change to $d->created_at
        }

Any suggestions?

Please sign in or create an account to participate in this conversation.