Stevee
Stevee
FFilament
Created by Stevee on 6/22/2024 in #❓┊help
How to structure ZIP files with folders
Im trying to put the files based on the collection tried this, but it return me all file instead foldered based in collection
$downloads = $yourModel->getMedia('downloads');
$downloads2 = $yourModel->getMedia('downloads2');
return MediaStream::create('my-files.zip')->addMedia($downloads)->addMedia($downloads2);
$downloads = $yourModel->getMedia('downloads');
$downloads2 = $yourModel->getMedia('downloads2');
return MediaStream::create('my-files.zip')->addMedia($downloads)->addMedia($downloads2);
2 replies
FFilament
Created by Stevee on 1/8/2024 in #❓┊help
minimal theme on additional panel
Hai, I'm trying to install minimal theme on some panels, it works on admin panel but I got this error on another panel,
str_contains(): Argument #2 ($needle) must be of type string, Filament\MinimalTheme given
str_contains(): Argument #2 ($needle) must be of type string, Filament\MinimalTheme given
5 replies
FFilament
Created by Stevee on 12/19/2023 in #❓┊help
TextInput integer save 0 as null
here is my code
TextInput::make('amount')
->integer()
->minValue(0)
->required()
TextInput::make('amount')
->integer()
->minValue(0)
->required()
if user put 0 into it, it saved as null instead of '0'
7 replies
FFilament
Created by Stevee on 12/6/2023 in #❓┊help
chart widget with page filter $dataChecksum must not be accessed before initialization
Typed property Filament\Widgets\ChartWidget::$dataChecksum must not be accessed before initialization {"userId":1,"exception":"[object] (Error(code: 0): Typed property Filament\\Widgets\\ChartWidget::$dataChecksum must not be accessed before initialization at vendor\\filament\\widgets\\src\\ChartWidget.php:104)
Typed property Filament\Widgets\ChartWidget::$dataChecksum must not be accessed before initialization {"userId":1,"exception":"[object] (Error(code: 0): Typed property Filament\\Widgets\\ChartWidget::$dataChecksum must not be accessed before initialization at vendor\\filament\\widgets\\src\\ChartWidget.php:104)
got this error when I try to combine ChartWidget with page filter feature
3 replies
FFilament
Created by Stevee on 10/30/2023 in #❓┊help
Validating Percentage Inputs in a Repeater
Hello everyone, I'm working on a project that involves a repeater for users to input percentages. I need to validate the input to meet the following criteria: The total combined percentage of all entries in the repeater should not exceed 100% and not < than 50. I'd appreciate any guidance or code examples on how to implement this validation effectively
7 replies
FFilament
Created by Stevee on 9/26/2023 in #❓┊help
configure table pagination at service provider
at table builder can do
public function table(Table $table): Table
{
return $table
->paginated([10, 25, 50, 100, 'all']);
}
public function table(Table $table): Table
{
return $table
->paginated([10, 25, 50, 100, 'all']);
}
can do it to apply to all panel in service provider ?
5 replies
FFilament
Created by Stevee on 9/22/2023 in #❓┊help
Add custom js to specific panel
I have more than 1 panel and I want to add custom js to specific panel, there is way to add it at https://filamentphp.com/docs/3.x/support/assets#registering-javascript-files , but it will load on all panel. so wondering is there method can use to add custom js at panel provider
3 replies
FFilament
Created by Stevee on 9/14/2023 in #❓┊help
only can edit resource if delete the update policy
only can edit resource if delete the update policy from the model, even if I try the update policy to always return true can't allow me to update the resource, hope someone can guide me where to check why something blocking me from update the model
2 replies
FFilament
Created by Stevee on 9/14/2023 in #❓┊help
how to fill form at simple page
tried to use $this->form->fill([]) but cant fill the form
33 replies
FFilament
Created by Stevee on 8/25/2023 in #❓┊help
Filament Spatie Translatable Plugin for relation model
how to do for the relation model at v3 ? it was fine at v2, did read the docs at https://github.com/filamentphp/spatie-laravel-translatable-plugin about the update but I think it only valid for translate the model itself
10 replies
FFilament
Created by Stevee on 8/24/2023 in #❓┊help
thousandsSeparator mask for v3
in v2 can do
TextInput::make('number')
->numeric()
->mask(fn (TextInput\Mask $mask) => $mask
->numeric()
->decimalPlaces(2) // Set the number of digits after the decimal point.
->decimalSeparator(',') // Add a separator for decimal numbers.
->integer() // Disallow decimal numbers.
->mapToDecimalSeparator([',']) // Map additional characters to the decimal separator.
->minValue(1) // Set the minimum value that the number can be.
->maxValue(100) // Set the maximum value that the number can be.
->normalizeZeros() // Append or remove zeros at the end of the number.
->padFractionalZeros() // Pad zeros at the end of the number to always maintain the maximum number of decimal places.
->thousandsSeparator(','), // Add a separator for thousands.
)
TextInput::make('number')
->numeric()
->mask(fn (TextInput\Mask $mask) => $mask
->numeric()
->decimalPlaces(2) // Set the number of digits after the decimal point.
->decimalSeparator(',') // Add a separator for decimal numbers.
->integer() // Disallow decimal numbers.
->mapToDecimalSeparator([',']) // Map additional characters to the decimal separator.
->minValue(1) // Set the minimum value that the number can be.
->maxValue(100) // Set the maximum value that the number can be.
->normalizeZeros() // Append or remove zeros at the end of the number.
->padFractionalZeros() // Pad zeros at the end of the number to always maintain the maximum number of decimal places.
->thousandsSeparator(','), // Add a separator for thousands.
)
what is the alternative for v3 ?
5 replies
FFilament
Created by Stevee on 8/23/2023 in #❓┊help
V3 clickable row at widget
I got this error after upgrading to v3
Filament\Resources\Resource::getUrl(): Argument #2 ($parameters) must be of type array, App\Models\ given
Filament\Resources\Resource::getUrl(): Argument #2 ($parameters) must be of type array, App\Models\ given
why it's expecting array
8 replies
FFilament
Created by Stevee on 5/5/2023 in #❓┊help
v2.17.35 problem on windows
105 replies
FFilament
Created by Stevee on 4/5/2023 in #❓┊help
subheading at resource
at page I can do getSubheading to put some text below title, is resource got something like that ?
2 replies