Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

SupunSam's avatar

Laravel Excel Export Warning

Hi All,

I have started to use Laravel Excel in my web app and it all works fine. I get the excel except following warning in my browser console:

Resource interpreted as Document but transferred with MIME type application/vnd.openxmlformats-officedocument.spreadsheetml.sheet: "http://fpone.homestead/jobsExport".

I've read in someplace that we can ignore this warning but the problem is my toast alert is not triggering due to this matter,

Following is my controller:

public function jobsExport()
    {

        Alert::toast('Jobs Exported into Excel', 'info');
        return Excel::download(new JobsExport, 'Jobs-' . Carbon::now() . '.xlsx', \Maatwebsite\Excel\Excel::XLSX);
    }

Can anyone give me some help to figure out a solution?

0 likes
9 replies
Snapey's avatar

Do you get the error if you don't set the Toast alert?

Sinnbeck's avatar

If you use an a tag, try adding the html download. Might not fix the issue with toast, but might fix the error

<a href="" download >Download </a>
SupunSam's avatar

@sinnbeck

I am using a href tag:

My blade file

<a href="{{route('jobsExport')}}" class="btn btn-secondary">
                Export Excel
            </a>
Sinnbeck's avatar
Sinnbeck
Best Answer
Level 102

Like this

<a href="{{route('jobsExport')}}" class="btn btn-secondary" download>
                Export Excel
            </a>
1 like
SupunSam's avatar

@sinnbeck ...

My bad. Extremely sorry. I haven't read that carefully.

Thank you very much. That solved the issue. However, the toast is not firing up still.

SupunSam's avatar

@sinnbeck

Actually that makes lot of sense. I will keep on looking. Thank you very much for your assistance.

Please or to participate in this conversation.