Php 如何在Laravel4中测试下载按钮?

Php 如何在Laravel4中测试下载按钮?,php,laravel,laravel-4,controller,download,Php,Laravel,Laravel 4,Controller,Download,我真的不明白为什么,即使在我注释了return语句之后,我的应用程序仍然允许下载。有线 我的下载路线如下所示 Route::get('catalog_downloads/{id}/download','CatalogDownloadController@file_download'); 我有一个Download按钮,在他们单击Ok之后,触发一个模式填充,并给出一个简短的说明,当我允许他们下载时,得到了它 这是我的下载按钮 <a class="black" data-toggle="mod

我真的不明白为什么,即使在我注释了return语句之后,我的应用程序仍然允许下载。有线

我的下载路线如下所示

Route::get('catalog_downloads/{id}/download','CatalogDownloadController@file_download');
我有一个
Download
按钮,在他们单击
Ok之后,触发一个模式填充,并给出一个简短的说明,当我允许他们下载时,得到了它

这是我的
下载
按钮

<a class="black" data-toggle="modal" data-target="#instruction">
                            <b class="cool-blue">
                                Download
                            </b>

                        </a>
<a href="/catalog_downloads/{{$catalog_download->id}}/download" class="btn btn-success btn-sm btn-next">
                        Ok, Got it.
                        <i class="fa fa-thumbs-up"></i>
                    </a>
我的控制器中的下载功能

public function file_download($id)
    {

        $catalog_download = CatalogDownload::findOrFail($id);
        $distributor      = Auth::user()->distributor()->first();
        $export_type      = $distributor->export_type()->first();
        $product_export =  $catalog_download->product_exports()->first();

        $destinationPath  = base_path().'/app/files/product_export/'. $catalog_download->id.'/'. $export_type->id.'/';
        $file_name        = $product_export->file_path;
        $pathToFile       = $destinationPath .$file_name;

        // return Response::download($pathToFile);


    }
是不是因为
modal
导致了所有这些? 我有没有做过我不知道的事?
有人能告诉我我错过了什么吗(

确保点击
save
refresh
页面


如果可能,请注销,然后重新登录,看看您是否仍然遇到此问题。

尝试使用Google Chrome上的匿名窗口或Firefox上的私有窗口进行测试,以确保没有以前会话中的缓存、会话或cookie。

您的应用程序中有多少用户类型?此问题是否也会发生其他用户是谁?或者只有那个用户。