Reputation: 6394
When using Laravel Nova you may expect $this->getOriginal('name')
to bypass an accessor to return the database value of name. However, this is not the case.
Text::make('Name')
->resolveUsing(function(){
return $this->getOriginal('name')
});
// Returns value provided by accessor
Upvotes: 1
Views: 467
Reputation: 6394
To access the actual original property use getRawOriginal()
Text::make('Name')
->resolveUsing(function(){
return $this->getRawOriginal('name')
});
// Returns value from database
Upvotes: 4