1
0
forked from s421507/eOSP2
eOSP2/app/Http/Controllers/documentApplicationController.php

29 lines
810 B
PHP
Raw Normal View History

2020-03-25 00:20:45 +01:00
<?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);
}
}
}