You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I am trying to restore a model. MyModel::withTrashed()->find(id)->restore().
The saveTransactions method gets called with a translation object for the current locale, with empty attributes. It then tries to insert that into the table, failing.
To Reproduce
class MyModel extends Model implements TranslatableContract
{
use Translatable;
public $translatedAttributes = ['name', 'web_name'];
}
Expected behavior
I would expect the restore event to be correctly handled. It is probably handled in the same manner as saved/created events.
Versions (please complete the following information)
PHP: 8.1
Database: mysql
Laravel: 10.16
Package: 11.12
The text was updated successfully, but these errors were encountered:
Describe the bug
I am trying to restore a model.
MyModel::withTrashed()->find(id)->restore()
.The
saveTransactions
method gets called with a translation object for the current locale, with empty attributes. It then tries to insert that into the table, failing.To Reproduce
Expected behavior
I would expect the restore event to be correctly handled. It is probably handled in the same manner as saved/created events.
Versions (please complete the following information)
The text was updated successfully, but these errors were encountered: