Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model::preventSilentlyDiscardingAttributes throws error for missing [created_at, updated_at] in fillable #572

Closed
itsrafsanjani opened this issue Sep 23, 2022 · 2 comments · Fixed by #574
Assignees
Labels
bug Something isn't working enhancement New feature or request question Further information is requested

Comments

@itsrafsanjani
Copy link

Describe the bug
Laravel 9.28 added Eloquent mode to prevent silently discarding fills for attributes not in $fillable (#43893)

To Reproduce

  1. Go to AppServiceProvider's boot method
  2. Add
Model::preventSilentlyDiscardingAttributes(! app()->isProduction());
  1. Try to deposit

Trace Error
{"type":"error","message":"Transaction failed. Message: Add fillable property [created_at, updated_at] to allow mass assignment on [Bavix\\Wallet\\Models\\Transaction]."}

Expected behavior
created_at and updated_at should not throw error like this

Server:

  • php version: 8.1
  • database: mysql 5.7
  • wallet version 9.3
  • cache lock: file
  • cache wallets: file
@itsrafsanjani itsrafsanjani added bug Something isn't working question Further information is requested labels Sep 23, 2022
@rez1dent3
Copy link
Member

@itsrafsanjani Hello. Thank you. I'll have to add this to my tests.

@rez1dent3
Copy link
Member

@itsrafsanjani tag 9.4.0

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working enhancement New feature or request question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants