-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
Cast array stores the entire model as json #24053
Comments
Can you update a column you've just saved? Try getting a new instance of that model after the create part. |
You have to use Also: |
Thanks for your prompt answer, but the result is the same! so weird
Could be something on the model itself?
|
Please run this and post the result (fully expanded):
|
Here it is collapsed to avoid spam. Click to show getQueryLog results
|
Do you have any accessors/mutators in your model? |
Not that I am aware of, but new here coming from symfony, I posted the model in question, were should I look for? Very fresh project with a single controller, 1 route, + used reliese/laravel |
You posted the model's whole code? If you upload your project somewhere (e.g. Dropbox), I'll take a look at it. Or you debug |
Thanks @staudenmeir The tgz is here http://dev2.lionix.com/laravelissue.tgz I only left the failing code with a demo JSON hardcoded. There is a simple backup in the root folder called thanks again for looking into this despite tillkruss confidence that is my fault lol |
That was a tricky one, TLDR: It's the fault of the Two possible workarounds:
|
awesome @staudenmeir - I am really grateful! 👍 I wouldn't be able to nail it as fast as you, thanks again! |
Description:
Doing this:
Causes the json stored in the DB to be the full
$exampleArray
instead of the json representation of ['123'=>'321']I am missing something? Created this laravel project with the latest laravel installer available today.
Steps To Reproduce:
The text was updated successfully, but these errors were encountered: