KiaBoluki
KiaBoluki
FFilament
Created by KiaBoluki on 1/13/2024 in #❓┊help
how to set max repeat for a repeater
I want to limit user to upload up to 3 images. I am using the repeater for this. is this best practice ? and if yes how can I limit the user to upload at least one and at most 3 images?
6 replies
FFilament
Created by KiaBoluki on 12/21/2023 in #❓┊help
Previous step is empty in wizard
No description
9 replies
FFilament
Created by KiaBoluki on 12/15/2023 in #❓┊help
stripCharacters() method not found on TextInput
hello based on the documentaion we can use :
use Filament\Forms\Components\TextInput;
use Filament\Support\RawJs;

TextInput::make('amount')
->mask(RawJs::make('$money($input)'))
->stripCharacters(',')
->numeric()
use Filament\Forms\Components\TextInput;
use Filament\Support\RawJs;

TextInput::make('amount')
->mask(RawJs::make('$money($input)'))
->stripCharacters(',')
->numeric()
but this code throws this error:
BadMethodCallException
PHP 8.2.4
Laravel 10.30.1
Method Filament\Forms\Components\TextInput::stripCharacters does not exist.
BadMethodCallException
PHP 8.2.4
Laravel 10.30.1
Method Filament\Forms\Components\TextInput::stripCharacters does not exist.
7 replies
FFilament
Created by KiaBoluki on 11/16/2023 in #❓┊help
where can I set the redirect url after user logout?
when user logouts from the user menu in filament v3 dashboard it redirects the user to /admin/login page. is it possible to redirect the user to /login page ?
7 replies
FFilament
Created by KiaBoluki on 8/24/2023 in #❓┊help
is it possible to make a filament resource based on scope ?
I am curious to know if it is possible to create different resources based on one model's scopes. For example, I have a Listing model with a type scope. Can I create a GameListingResource for Listings with a type of Game, and a GiftCardResource for Listings with a type of GiftCard? If yes, how can I do that? If no, any suggestions would be appreciated.
6 replies
FFilament
Created by KiaBoluki on 8/20/2023 in #❓┊help
use avatar and user menu component in home page nav bar
how can I use filament avatar component with it's related user menu in my home page ?
4 replies
FFilament
Created by KiaBoluki on 7/26/2023 in #❓┊help
is it possible to disable form while image is uploading?
the field state goes uncompleted after image upload. is there any way to disable the form while image is uploading?
8 replies
FFilament
Created by KiaBoluki on 7/20/2023 in #❓┊help
Handle Query Exception
I have a slug column in db table but it dosen't exist on the form and generated by spatie/laravel-sluggable . how can I check either the slug is unique before creating the model in Filament resource or how can I handle query exception to show the notification
4 replies
FFilament
Created by KiaBoluki on 7/11/2023 in #❓┊help
Add action buttons to custom page with HasForms
Hi everyone, I have a question regarding the best method to add action buttons, such as "Create" to my custom page. I've been searching through the documentation, but couldn't find any relevant information. I attempted to implement the HasFormActions interface on my Page and added the getCachedFormAction() method. However, I'm unsure how to properly render these buttons in the view. If anyone has any insights or suggestions, I would greatly appreciate your help. Thank you!
class Edit extends Page implements HasForms, HasFormActions
{
use InteractsWithForms;

// ...

public function getCachedFormAction(string $name): ?\Filament\pages\Actions\Action
{
if ($name === 'submit') {
return \Filament\pages\Actions\Action::make('submit')
->action('submit')
->icon('heroicon-s-save');
}
return null;
}
}
class Edit extends Page implements HasForms, HasFormActions
{
use InteractsWithForms;

// ...

public function getCachedFormAction(string $name): ?\Filament\pages\Actions\Action
{
if ($name === 'submit') {
return \Filament\pages\Actions\Action::make('submit')
->action('submit')
->icon('heroicon-s-save');
}
return null;
}
}
and my view :
<x-filament::page>

{{ $this->form }}

</x-filament::page>
<x-filament::page>

{{ $this->form }}

</x-filament::page>
8 replies