forked from s421507/eOSP2
29 lines
810 B
PHP
29 lines
810 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Http\Controllers;
|
||
|
|
||
|
use Illuminate\Http\Request;
|
||
|
use Illuminate\Support\Facades\DB;
|
||
|
|
||
|
class documentApplicationController extends Controller
|
||
|
{
|
||
|
public function create(){
|
||
|
|
||
|
if(auth()->user() != null && auth()->user()->fireStationID != null ){
|
||
|
$fireFighters = DB::table('users')->where("fireStationID", "=", auth()->user()->fireStationID )->get();
|
||
|
return view("documentApplicationForm", ["fireFighters" => $fireFighters]);
|
||
|
} else{
|
||
|
return view('home');
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
public function printPDF(){
|
||
|
if(auth()->user() != null && auth()->user()->fireStationID != null ) {
|
||
|
$request = request();
|
||
|
$test = new documentOverlayController();
|
||
|
$test->testPdf($request->fireFighterID);
|
||
|
}
|
||
|
}
|
||
|
}
|