941dbd5997
Restores all files to thef8a1310security-review snapshot as requested, plus the 2 boot-critical fixes froma24c8a2(config/session.php env() instead of app()->environment(), and removal of the duplicate $activeTab in ProjectMap.php) so the application actually boots. Forward commit, no history rewrite. The7d854ffstate remains in history. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
36 lines
929 B
PHP
36 lines
929 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Reports;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Models\Project;
|
|
use App\Models\Phase;
|
|
use App\Models\Inspection;
|
|
use Maatwebsite\Excel\Facades\Excel;
|
|
use App\Exports\ProjectsExport;
|
|
use App\Exports\PhasesExport;
|
|
use App\Exports\InspectionsExport;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Support\Facades\Gate;
|
|
|
|
class ExportController extends Controller
|
|
{
|
|
public function exportProjects(Request $request)
|
|
{
|
|
Gate::authorize('manage all');
|
|
return Excel::download(new ProjectsExport, 'projects.xlsx');
|
|
}
|
|
|
|
public function exportPhases(Request $request)
|
|
{
|
|
Gate::authorize('manage all');
|
|
return Excel::download(new PhasesExport, 'phases.xlsx');
|
|
}
|
|
|
|
public function exportInspections(Request $request)
|
|
{
|
|
Gate::authorize('manage all');
|
|
return Excel::download(new InspectionsExport, 'inspections.xlsx');
|
|
}
|
|
}
|