<?php

namespace App\Http\Controllers\Reports;

use App\Exports\InspectionsExport;
use App\Exports\PhasesExport;
use App\Exports\ProjectsExport;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Maatwebsite\Excel\Facades\Excel;

class ExportController extends Controller
{
    public function exportProjects(Request $request)
    {
        return Excel::download(new ProjectsExport, 'projects.xlsx');
    }

    public function exportPhases(Request $request)
    {
        return Excel::download(new PhasesExport, 'phases.xlsx');
    }

    public function exportInspections(Request $request)
    {
        return Excel::download(new InspectionsExport, 'inspections.xlsx');
    }
}
