Eugen Pașca
Eugen Pașca
FFilament
Created by B2 on 11/19/2024 in #❓┊help
The POST method is not supported for route admin/login for custom login page
the error you get "The POST method is not supported for route admin/login. Supported methods: GET, HEAD" means that livewire/livewire.js is not loaded. or at least this happens for me. the problem you are facing is that livewire/livewire.js is a route and your server tries to load it as a file. Try to check the vhost config or try to publish the livewire files. in my case the problem from vhost was this line . If you remove the JS from that list it would work. But i think the vendor:publish method is better
location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|woff2|eot|mp4|ogg|ogv|webm|webp|zip|swf|map)$ {
add_header Access-Control-Allow-Origin "*";
expires max;
access_log off;
}
location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|woff2|eot|mp4|ogg|ogv|webm|webp|zip|swf|map)$ {
add_header Access-Control-Allow-Origin "*";
expires max;
access_log off;
}
php artisan vendor:publish --force --tag=livewire:assets
5 replies
FFilament
Created by Zoltar on 11/14/2024 in #❓┊help
exporter, simple question
it can be customized exactly as any other action in filament:
ExportAction::make()
->modalHeading('MODAL HEADING ( Esporta users)')
->exporter(
// ExporterClass::class
),
ExportAction::make()
->modalHeading('MODAL HEADING ( Esporta users)')
->exporter(
// ExporterClass::class
),
9 replies
FFilament
Created by Zoltar on 11/14/2024 in #❓┊help
exporter, simple question
what you mean by exporter's form ?
9 replies
FFilament
Created by Sourabh on 9/5/2024 in #❓┊help
Open the custom page in a new browser tab.
hello, not sure where or how you have the action included, but why not use the openUrlInNewTab method or the 2nd parameter for the url method on that action?
ViewAction::make()->openUrlInNewTab(),
Action::make('custom_action')
->url(
url:route('your-route-name'),
shouldOpenInNewTab: true
),
ViewAction::make()->openUrlInNewTab(),
Action::make('custom_action')
->url(
url:route('your-route-name'),
shouldOpenInNewTab: true
),
3 replies
FFilament
Created by Eugen Pașca on 4/4/2024 in #❓┊help
SelectFilter search in multiple columns - Is this intended
Oh, yeah that is even better. Thanks
5 replies
FFilament
Created by yaroslavpopovic on 2/14/2024 in #❓┊help
Spatie Media Library custom file name
hey, @yaroslavpopovic , did you find a solution for this?
4 replies
FFilament
Created by JJSanders on 1/25/2024 in #❓┊help
Access record data
Yeah, you are right, I was thinking that by asking to access the data of a record, there must have been a record to begin with, like on the view/edit.
8 replies
FFilament
Created by JJSanders on 1/25/2024 in #❓┊help
Access record data
you could inject the Component into your required method in your form ( https://filamentphp.com/docs/3.x/forms/advanced#injecting-the-current-livewire-component-instance ) Or if you really need to access the record data, i managed to do that including the form method directly into the view/edit Pages. there it would not be static anymore so it should have access to the record
public function form(Form $form): Form
{
// Here I would like to access the record data before returning the form
$record = $this->getRecord();
return $form
->columns(1)
->schema(Product::getForm());
}
public function form(Form $form): Form
{
// Here I would like to access the record data before returning the form
$record = $this->getRecord();
return $form
->columns(1)
->schema(Product::getForm());
}
8 replies
FFilament
Created by Augus on 9/25/2023 in #❓┊help
Select field issues with combination of Live + Disabled.
Have you tried to have a callable for the disabled method?
Select::make('relation')
->searchable()
->label('Relatie')
->live()
->options(
auth()->user()->relations->mapWithKeys(function ($relation) {
return [$relation->id => $relation->full_name];
})
),
Select::make('ubn')
->searchable()
->label('UBN')
->disabled(fn(Get $get) => empty($get('relation'))
->options(fn (Get $get
): Collection|array => ! empty($get('relation')) ? Contact::find($get('relation'))->locations()->pluck('ubn',
'id') : ['#' => 'Selecteer eerst een relatie']

),
Select::make('relation')
->searchable()
->label('Relatie')
->live()
->options(
auth()->user()->relations->mapWithKeys(function ($relation) {
return [$relation->id => $relation->full_name];
})
),
Select::make('ubn')
->searchable()
->label('UBN')
->disabled(fn(Get $get) => empty($get('relation'))
->options(fn (Get $get
): Collection|array => ! empty($get('relation')) ? Contact::find($get('relation'))->locations()->pluck('ubn',
'id') : ['#' => 'Selecteer eerst een relatie']

),
10 replies
FFilament
Created by Eugen Pașca on 9/20/2023 in #❓┊help
List Resources - GetTabs: modifyQueryUsing not working with relationships or scopes
Thank you for pointing it out. My bad, I redacted the original question.
8 replies
FFilament
Created by Anto on 9/20/2023 in #❓┊help
Problem displaying laravel model $hidden fields in Filament forms
I had a similar need, In my case I wanted to display a hidden property in a form. I ended up using:
TextInput::make('secret')
->visibleOn('view')
->formatStateUsing(fn (Client $client) => $client->secret),
TextInput::make('secret')
->visibleOn('view')
->formatStateUsing(fn (Client $client) => $client->secret),
5 replies