© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
2 replies
Sidem

Export didn't work

Hi,
i can't make the user to dowload the file but the link is good and when i put it on an other tab of my google, it work :

there is my code in app\Services\ExportService.php :
public static function export($datas, $type)
    {

        //... my code
    
  $writer->save($excelFile);
  $filename = $name . now()->format('Y-m-d_H-i-s') . '.xlsx';
  $filePath = 'public/' . $filename;
  Storage::disk('local')->put($filePath, file_get_contents($excelFile));
  unlink($excelFile);
  return response()->download(storage_path('app/' . $filePath), $filename);
    }
public static function export($datas, $type)
    {

        //... my code
    
  $writer->save($excelFile);
  $filename = $name . now()->format('Y-m-d_H-i-s') . '.xlsx';
  $filePath = 'public/' . $filename;
  Storage::disk('local')->put($filePath, file_get_contents($excelFile));
  unlink($excelFile);
  return response()->download(storage_path('app/' . $filePath), $filename);
    }

if i do
dd(return response()->download(storage_path('app/' . $filePath), $filename));
dd(return response()->download(storage_path('app/' . $filePath), $filename));


it will send me a link that will download the file if I put it on another Google tab
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Export Action didn't Export A Defined Column
FilamentFFilament / ❓┊help
11mo ago
Validation didn't work
FilamentFFilament / ❓┊help
3y ago
Export action doesn't work anymore
FilamentFFilament / ❓┊help
2y ago
Infolist extraAttributes didn't work for tailwindcss
FilamentFFilament / ❓┊help
2y ago