Initial commit: CABM-IT (ItGlue-style MSP documentation platform)

Laravel 13 + Livewire/Volt app for managing client organizations,
documents, passwords, flexible assets, virtual machines, contacts,
domains, todos, shortcuts, and role-based user administration.
This commit is contained in:
jeremy bayse
2026-08-16 13:28:12 +02:00
commit 8f22dca9c8
209 changed files with 23324 additions and 0 deletions
@@ -0,0 +1,24 @@
<?php
namespace App\Http\Controllers;
use App\Models\Document;
use App\Models\Organization;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage;
use Symfony\Component\HttpFoundation\StreamedResponse;
class DocumentDownloadController extends Controller
{
public function __invoke(Request $request, Organization $organization, Document $document): StreamedResponse
{
abort_unless($document->organization_id === $organization->id, 404);
abort_unless($document->isUpload() && $document->file_path, 404);
if ($request->boolean('inline')) {
return Storage::response($document->file_path, $document->name);
}
return Storage::download($document->file_path, $document->name);
}
}