melengkapi feature download pdf di menu SPK dan Registrasi Final

This commit is contained in:
Andy Chaerudin
2024-11-05 16:04:07 +07:00
committed by putrakuningan
parent a2e099e9fe
commit bfacdbe164
7 changed files with 23 additions and 12 deletions

View File

@@ -4,7 +4,7 @@ namespace Modules\Lpj\Http\Controllers;
use Carbon\Carbon;
use App\Http\Controllers\Controller;
use Barryvdh\DomPDF\Facade\Pdf;
use Barryvdh\DomPDF\Facade\Pdf; // https://github.com/barryvdh/laravel-dompdf
use Exception;
use Illuminate\Http\Request;
use Maatwebsite\Excel\Facades\Excel;
@@ -235,4 +235,10 @@ use Illuminate\Support\Facades\Auth;
return view('lpj::spk.dokumennya', compact('data', 'penawaran'));
}
public function download($id) {
$document = Permohonan::find($id);
return response()->download(storage_path('app/public/' .$document->dokumen));
}
}