AgonK
how to send request and get response inside action button
yes you are right, I also call service function instead API route
The error of second solution is
cURL error 28: Operation timed out after 30005 milliseconds with 0 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://127.0.0.1:8000/api/invoices/monthly?title=AutoGenerate
26 replies
how to send request and get response inside action button
I excepted to do something like this
Action::make('generate_invoices')
->label(('filament.generate_monthly_invoice'))
->icon('heroicon-o-document-duplicate')
->tooltip(('filament.generate_monthly_invoice'))
->action(function (){
$response = route('generate-monthly-invoices', ['title'=>'Auto generate']);
}),
or
->action(function (){
$response = Http::get(route('generate-monthly-invoices', ['title'=>'Auto generate']));
}),
but nothing works
@Anik
26 replies
how to integrate existing APIs with filament
Hmm no I think I don’t need for override entire method. What I need is to make compatible with APIs response conventions. If status is false I want to show the message property and tell the user the error
21 replies