hosmar27
hosmar27
FFilament
Created by hosmar27 on 4/9/2025 in #❓┊help
How to use a file from other project
I’ll try to store everything on a s3 from Amazon, I think it’ll be the best for my projects
11 replies
FFilament
Created by hosmar27 on 4/9/2025 in #❓┊help
How to use a file from other project
Thanks for the tip 👍
11 replies
FFilament
Created by hosmar27 on 4/9/2025 in #❓┊help
How to use a file from other project
I was thinking that it would end on this hahahah
11 replies
FFilament
Created by hosmar27 on 4/9/2025 in #❓┊help
How to use a file from other project
I'm using this plugin by the way https://filamentphp.com/plugins/hugomyb-media-action#preload But it would be really usefull if anyone could explain to me even using FileUpload, I just want to know how to get to the file outside the project
11 replies
FFilament
Created by hosmar27 on 4/9/2025 in #❓┊help
How to use a file from other project
I tried this:
MediaAction::make(__('Visualize document'))
->translateLabel()
->icon('heroicon-o-clipboard-document-check')
->modalHeading(__('Curriculum'))
->media(fn ($record) => '../../../../../../../../candidate-system/public/storage/'.$record->attachments->url)
->hidden(function ($record) {
if (empty($record->attachments->url)) {
return true;
} else {
return false;
}
}),
MediaAction::make(__('Visualize document'))
->translateLabel()
->icon('heroicon-o-clipboard-document-check')
->modalHeading(__('Curriculum'))
->media(fn ($record) => '../../../../../../../../candidate-system/public/storage/'.$record->attachments->url)
->hidden(function ($record) {
if (empty($record->attachments->url)) {
return true;
} else {
return false;
}
}),
11 replies
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