phphelloworld
phphelloworld
FFilament
Created by phphelloworld on 9/28/2024 in #❓┊help
Infolist - Relation Manager with related records read-only
In panel builder I have a table Users with relation to Courses. I use Infolist for detail records. In the bottom of the page I can see related Courses, but without any options to edit or add. Can you put me on the right way to do that? Thanks in advance
3 replies
FFilament
Created by phphelloworld on 5/21/2024 in #❓┊help
File upload - Division by zero
If I set imageResizeTargetHeight:
Forms\Components\FileUpload::make('image')
->imageResizeTargetHeight('400')
Forms\Components\FileUpload::make('image')
->imageResizeTargetHeight('400')
it gives me error: Division by zero View: vendor/filament/forms/resources/views/components/file-upload.blade.php Could you put me on the right way to solve this issue?
4 replies
FFilament
Created by phphelloworld on 4/8/2024 in #❓┊help
createOptionForm - item not automatically selected
What I am trying to do: Add new option in select. What I did:
Forms\Components\Select::make('descr_id')
->relationship(name: 'descrizione', titleAttribute: 'descr')
->createOptionForm([
Forms\Components\TextInput::make('descr'),
]),
Forms\Components\Select::make('descr_id')
->relationship(name: 'descrizione', titleAttribute: 'descr')
->createOptionForm([
Forms\Components\TextInput::make('descr'),
]),
//model
public function descrizione()
{
return $this->belongsTo(MalerbaPagamentiDescr::class, 'descr_id','id');
}
//model
public function descrizione()
{
return $this->belongsTo(MalerbaPagamentiDescr::class, 'descr_id','id');
}
My issue/the error: New item is added in the list as expected but not automatically selected.
4 replies
FFilament
Created by phphelloworld on 12/2/2023 in #❓┊help
searchable() in Select blocks listing items
If I Add ->searchable() option the items are no more listing. I used also the basic example from the documentation. I tried with getSearchResultsUsing(...) without luck. I have no error message in console. If I delete searchable() everything works as expected. Everything is updated. This is the code:
Select::make('status')
->searchable()
->options([
'In Process' => [
'draft' => 'Draft',
'reviewing' => 'Reviewing',
],
'Reviewed' => [
'published' => 'Published',
'rejected' => 'Rejected',
],
]),
Select::make('status')
->searchable()
->options([
'In Process' => [
'draft' => 'Draft',
'reviewing' => 'Reviewing',
],
'Reviewed' => [
'published' => 'Published',
'rejected' => 'Rejected',
],
]),
3 replies