FeedbackExport.php 594 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace App\Admin\Exports\Jobfairout;
  3. use App\Admin\Exports\ViewExport;
  4. use Illuminate\Contracts\View\View;
  5. use Illuminate\Support\Collection;
  6. class FeedbackExport extends ViewExport
  7. {
  8. /**
  9. * 设置文件名
  10. * @return string
  11. */
  12. public function getFilename(): string
  13. {
  14. return "feedback.xls";
  15. }
  16. /**
  17. * 渲染对应的视图
  18. * @param Collection $data 导出的数据
  19. * @return View
  20. */
  21. public function getView(Collection $data): View
  22. {
  23. return view('admin.exports.jobfairout.feedback', ['data'=>$data]);
  24. }
  25. }