Closed pedramkat closed 2 years ago
@pedramkat Hello,
Can you tell me what version of "nova" and "tab translatable" you use?
My Nova Version is "3.32.0" And kongulov/nova-tab-translatable => "1.1.1"
When i manually put this string "{'it':'path_to_file_it','en':'path_to_file_en'}" in the database under 'audio' column it works. But also the Delete button is not working.
I also noted that the $request->file() is consist of all files being uploaded to the model:
array(2) translations_audio_it: Illuminate\Http\UploadedFile translations_audio_en:Illuminate\Http\UploadedFile
and there is a loop on ->store function for each of these files where loops over the original array: $request->file()
Too many loops
Hello, I have a problem with uploading file in different languages. In specific i have an 'audio' field where i used to save the url of the uploaded file. now i need it to be translatable:
NovaTabTranslatable::make([ File::make(__('Audio'), 'audio')->store(function (Request $request, $model) { return $model->uploadAudio($request->file()); })->acceptedTypes('audio/*')->onlyOnForms(), ]),
the method uploadAudio returns a string like {"it":"url","en":"url"}
The issue is that i am getting: Undefined column: 7 ERROR: column \"translations_audio_en\" of relation \"model_name\" does not exist
the column name should be 'audio'. Can you tell what i am doing wrong?