authorize('viewAny', Estimate::class); if ($request->query('format') === 'lines') { return EstimateLineExport::download($request); } return EstimateExport::download($request); } }