lutek
lutek
FFilament
Created by lutek on 10/14/2024 in #❓┊help
Grid table, align stack component to bottom.
No description
17 replies
FFilament
Created by lutek on 3/18/2024 in #❓┊help
SpatieMediaLibraryImageEntry stopped displaying images
Just noticed after upgrade to 3.2.52 (filament/spatie-laravel-media-library-plugin). I don't see any breaking changes. I'm using s3 (minio) storage.
Components\SpatieMediaLibraryImageEntry::make('designerProfile.media')
->label('Project wykonany przez')
->helperText(fn ($record) => $record->designerProfile->profile_name)
->collection(config('project.designer_media_collections.logo'))
//->conversion('full')
->extraImgAttributes([
'class' => 'rounded-lg',
])
->size('100%')
->checkFileExistence(false)
->url(
fn ($record): string => DesignerProfileResource::getUrl(
'view',
['record' => $record->designer_profile_id]
)
),
Components\SpatieMediaLibraryImageEntry::make('designerProfile.media')
->label('Project wykonany przez')
->helperText(fn ($record) => $record->designerProfile->profile_name)
->collection(config('project.designer_media_collections.logo'))
//->conversion('full')
->extraImgAttributes([
'class' => 'rounded-lg',
])
->size('100%')
->checkFileExistence(false)
->url(
fn ($record): string => DesignerProfileResource::getUrl(
'view',
['record' => $record->designer_profile_id]
)
),
the same with
Tables\Columns\SpatieMediaLibraryImageColumn::make('logo')
->collection(config('project.designer_media_collections.logo'))
->conversion('thumb')
->size('100%')
->extraImgAttributes([
'class' => 'rounded-lg',
])
->alignCenter(),
Tables\Columns\SpatieMediaLibraryImageColumn::make('logo')
->collection(config('project.designer_media_collections.logo'))
->conversion('thumb')
->size('100%')
->extraImgAttributes([
'class' => 'rounded-lg',
])
->alignCenter(),
2 replies
FFilament
Created by lutek on 2/5/2024 in #❓┊help
how to fill image on full card box (stacked)
No description
7 replies
FFilament
Created by lutek on 10/18/2023 in #❓┊help
Multiselect from->getState() empty values
I'm new to Laravel and Filament. Have created custom page where using multiselect will create mutliple records for Document model assigned to "holder". I don't know why getting data from form->getState() doesn't have multiselect values. What am I configuring wrong?
class Document extends Model
{
use HasFactory, HasTranslations;

protected $table = 'document';

protected $guarded = [];

public array $translatable = [];

protected $casts = [
'holders' => 'array',
];

protected static function booted(): void
{
static::addGlobalScope(new OrganizationScope);
}

public function organization(): BelongsTo
{
return $this->belongsTo(Organization::class)->where(['is_master' => 0]);
}

public function documentBase(): BelongsTo
{
return $this->belongsTo(DocumentBase::class)->where(['is_active' => 1]);
}

public function holder(): BelongsTo
{
return $this->belongsTo(Holder::class);
}
}
class Document extends Model
{
use HasFactory, HasTranslations;

protected $table = 'document';

protected $guarded = [];

public array $translatable = [];

protected $casts = [
'holders' => 'array',
];

protected static function booted(): void
{
static::addGlobalScope(new OrganizationScope);
}

public function organization(): BelongsTo
{
return $this->belongsTo(Organization::class)->where(['is_master' => 0]);
}

public function documentBase(): BelongsTo
{
return $this->belongsTo(DocumentBase::class)->where(['is_active' => 1]);
}

public function holder(): BelongsTo
{
return $this->belongsTo(Holder::class);
}
}
2 replies