hosmar27
hosmar27
FFilament
Created by hosmar27 on 9/27/2024 in #❓┊help
How to switch/invert toggle in Filament
I've actually used booted function on my model, thank you for the help
6 replies
FFilament
Created by hosmar27 on 8/22/2024 in #❓┊help
Dynamically change Form component in Repeater
I searched for it and found nothing, could you explain to me how to do it?
5 replies
FFilament
Created by hosmar27 on 8/22/2024 in #❓┊help
Dynamically change Form component in Repeater
No description
5 replies
FFilament
Created by hosmar27 on 7/25/2024 in #❓┊help
Pass array as parameter in Resource::getUrl
I'll try it, thank you for helping
7 replies
FFilament
Created by hosmar27 on 7/25/2024 in #❓┊help
Pass array as parameter in Resource::getUrl
If needed more information I can show it
7 replies
FFilament
Created by hosmar27 on 7/25/2024 in #❓┊help
Pass array as parameter in Resource::getUrl
No description
7 replies
FFilament
Created by hosmar27 on 7/25/2024 in #❓┊help
Pass array as parameter in Resource::getUrl
this is the $formulario query:
$formulario = Formulario::query('ativo', true)->whereIn('id', $formularioId)->get('id');
$formulario = Formulario::query('ativo', true)->whereIn('id', $formularioId)->get('id');
7 replies
FFilament
Created by hosmar27 on 7/24/2024 in #❓┊help
Eloquent query inside foreach
thanks for the tip, I have already done it on the tabs in my question resource
12 replies
FFilament
Created by hosmar27 on 7/24/2024 in #❓┊help
Eloquent query inside foreach
$formulario = Formulario::query('ativo', true)->whereIn('id', $formularioId);
12 replies
FFilament
Created by hosmar27 on 7/24/2024 in #❓┊help
Eloquent query inside foreach
Thank you, it worked
12 replies
FFilament
Created by hosmar27 on 7/24/2024 in #❓┊help
Eloquent query inside foreach
the foreach is taking the right 'id' in that first dd(), but the secound one returns nothing, #items: []
12 replies
FFilament
Created by hosmar27 on 7/24/2024 in #❓┊help
Eloquent query inside foreach
that ->toArray() is a mistake😅
12 replies
FFilament
Created by hosmar27 on 7/24/2024 in #❓┊help
Eloquent query inside foreach
Thanks for your help sir, so basically what I'm doing is a quiz, and this is a part before I send all data to a form repeater and display all questions. So what is happening in the foreach is that it takes the formulario_id (translated is quiz_id) from the pivot table (called cargo_formulario) and I'm trying to search for all the 'pergunta' (question) and trying to display its 'texto' (text)
12 replies
FFilament
Created by hosmar27 on 7/24/2024 in #❓┊help
Eloquent query inside foreach
my current code:
foreach($formularioIds as $formularioId){
// dd($formularioId->id);
$formulario = Formulario::query('ativo', true)->where('id', '=' , $formularioId)->where('pergunta', true)->get('texto')->toArray();
}
dd($formulario);
foreach($formularioIds as $formularioId){
// dd($formularioId->id);
$formulario = Formulario::query('ativo', true)->where('id', '=' , $formularioId)->where('pergunta', true)->get('texto')->toArray();
}
dd($formulario);
12 replies
FFilament
Created by hosmar27 on 7/18/2024 in #❓┊help
Repeater relationship returns null
I think the same, I'll try to think about something diferent, thanks for your time and help
74 replies
FFilament
Created by hosmar27 on 7/18/2024 in #❓┊help
Repeater relationship returns null
so the repeater will display the question in the TextInput's label, and the user will be able to answer and save in another table
74 replies
FFilament
Created by hosmar27 on 7/18/2024 in #❓┊help
Repeater relationship returns null
it can't be, I want to make something like a quiz, 'pergunta' translated to english is 'question' and 'Formulario' is 'Quiz'
74 replies
FFilament
Created by hosmar27 on 7/18/2024 in #❓┊help
Repeater relationship returns null
is it possible?
74 replies
FFilament
Created by hosmar27 on 7/18/2024 in #❓┊help
Repeater relationship returns null
but for that I would need to have the data from formulario where formulario_id from CargoFormulario is = to id from Formulario, same for cargo_id and id from cargo
74 replies
FFilament
Created by hosmar27 on 7/18/2024 in #❓┊help
Repeater relationship returns null
something like it, but from Formulario, like ->label(fn ($livewire) => $livewire->record->formularios.pergunta) or just ->pergunta
74 replies