Sourabh
Sourabh
FFilament
Created by Sourabh on 10/16/2024 in #❓┊help
How do apply css on modal submit Action
No description
6 replies
FFilament
Created by Sourabh on 10/14/2024 in #❓┊help
Filament Registration page
No description
4 replies
FFilament
Created by Sourabh on 9/27/2024 in #❓┊help
How do i set default image in FileUpload ?
How do I set the default image in the fileupload form component? or can i show the default image while file upload ?
<?php
Forms\Components\FileUpload::make('company_logo')
->label('Company Logo')
->image()
->required()
->rules([
'image',
'mimes:jpeg,png,jpg',
'max:2048',
'dimensions:max_width=300,max_height=200',
])
->default(fn ($record) => $record && $record->company_logo ? $record->company_logo : asset('/images/company_logo.png')
->disk('company_logo') // from filesystems.php
->maxFiles(1)

?>
<?php
Forms\Components\FileUpload::make('company_logo')
->label('Company Logo')
->image()
->required()
->rules([
'image',
'mimes:jpeg,png,jpg',
'max:2048',
'dimensions:max_width=300,max_height=200',
])
->default(fn ($record) => $record && $record->company_logo ? $record->company_logo : asset('/images/company_logo.png')
->disk('company_logo') // from filesystems.php
->maxFiles(1)

?>
I have also try
<?php
->defaultImageUrl(asset('/images/company_logo.png'))
?>
<?php
->defaultImageUrl(asset('/images/company_logo.png'))
?>
5 replies
FFilament
Created by Sourabh on 9/5/2024 in #❓┊help
Open the custom page in a new browser tab.
No description
3 replies
FFilament
Created by Sourabh on 8/27/2024 in #❓┊help
Filament Table tab
No description
21 replies
FFilament
Created by Sourabh on 8/22/2024 in #❓┊help
import Action method examples does not exist.
I'm trying to add multiple examples to the CSV file, but I'm getting an error saying 'method examples does not exist.' Please find below the flare link and attachment of my code .
<?php
ImportColumn::make('sku')
->label('SKU')
->exampleHeader('SKU')
->examples(['ABC123', 'DEF456']),?>
<?php
ImportColumn::make('sku')
->label('SKU')
->exampleHeader('SKU')
->examples(['ABC123', 'DEF456']),?>
11 replies
FFilament
Created by Sourabh on 8/21/2024 in #❓┊help
Import csv data
How can I import data from an Excel or CSV file when the field does not exist in the model or database table? But still, i need to keep the custom field in import csv file because i am using that field for my internal calculations and rectifying records. so that field is not to be imported into the table . Here, my custom field is sku . I have shared my code in the attachment.
3 replies
FFilament
Created by Sourabh on 7/31/2024 in #❓┊help
Modal Blade component background not showing transparent.
No description
17 replies
FFilament
Created by Sourabh on 7/31/2024 in #❓┊help
Modal Sticky Footer livewire component
No description
2 replies
FFilament
Created by Sourabh on 6/11/2024 in #❓┊help
Custom form field
No description
15 replies
FFilament
Created by Sourabh on 6/10/2024 in #❓┊help
Table custom filter validate
No description
7 replies
FFilament
Created by Sourabh on 6/7/2024 in #❓┊help
Table Layout
No description
3 replies
FFilament
Created by Sourabh on 5/17/2024 in #❓┊help
Table Custom Column Update.
No description
8 replies
FFilament
Created by Sourabh on 5/17/2024 in #❓┊help
Access Relationship Data in Table Layout Custom HTML
How to access relationship data in Table Layout: Custom HTML. I have products and I want to show their variants in the custom HTML. https://filamentphp.com/docs/3.x/tables/layout#custom-html
<?php
//Product Model
public function variants(): HasMany
{
return $this->hasMany(ProductVariant::class);
}
<?php
//Product Model
public function variants(): HasMany
{
return $this->hasMany(ProductVariant::class);
}
```<?php
// ProductResource.php
View::make('products.table.collapsible-row-content')
->collapsible(),
```<?php
// ProductResource.php
View::make('products.table.collapsible-row-content')
->collapsible(),
<?php
// I try below code in the blade file.
// resources/views/products/table/collapsible-row-content.blade.php
<p class="px-4 py-3 bg-gray-100 rounded-lg">
<span class="font-medium">
@foreach($getRecord()->variants() as $productVariant)
<p>{{$productVariant->description}}</p>
@endforeach
</span>
</p>
<?php
// I try below code in the blade file.
// resources/views/products/table/collapsible-row-content.blade.php
<p class="px-4 py-3 bg-gray-100 rounded-lg">
<span class="font-medium">
@foreach($getRecord()->variants() as $productVariant)
<p>{{$productVariant->description}}</p>
@endforeach
</span>
</p>
3 replies
FFilament
Created by Sourabh on 5/8/2024 in #❓┊help
Table row: expand/collapse
No description
7 replies
FFilament
Created by Sourabh on 5/6/2024 in #❓┊help
Dropdown in csv import
No description
2 replies
FFilament
Created by Sourabh on 5/2/2024 in #❓┊help
Tooltip on table column header
No description
6 replies
FFilament
Created by Sourabh on 4/9/2024 in #❓┊help
how to remove or hide column in csv import
No description
2 replies
FFilament
Created by Sourabh on 4/8/2024 in #❓┊help
Excel Import modal
No description
5 replies
FFilament
Created by Sourabh on 4/4/2024 in #❓┊help
Failed to import csv
No description
27 replies