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

Being able to access the translations from the UpdateOrCreate method #274

Open
cris-alteregoweb opened this issue Apr 7, 2022 · 0 comments

Comments

@cris-alteregoweb
Copy link

It would be nice to be able to access the translations in the condition of the updateOrCreate method just like when using it when doing insert. Something like that:

Model::updateOrCreate([ 'model_id' => $model->id, 'es' => [ 'section' => 'Ejemplo', 'title' => 'Ejemplo documento ', 'doc' => 'documento.pdf', ], ], [ 'model_id' => $model->id, 'es' => [ 'section' => 'Ejemplo', 'title' => 'Ejemplo documento', 'doc' => 'documento_es.pdf', ], 'en' => [ 'section' => 'Example', 'title' => 'Example document', 'doc' => 'document_en.pdf', ], ]);

I find myself in this problem and I thought it was a good idea to propose it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants