fix nazw tabel bd

This commit is contained in:
Krzysztof Strzelecki 2020-07-12 16:11:49 +02:00
parent aa5a8df45f
commit a6ce63a6d3

View File

@ -44,7 +44,7 @@ class documentApplicationController extends Controller
->select('users.id','users.name', 'users.surname', 'users.PESEL', 'users.fireStationID','users.phoneNumber', 'users.email', 'ranks.rank', 'unitFunctions.unitFunction', 'users.number')
->first();
$fireStation = DB::table('firestations')->where("id", '=', $userData->fireStationID)->first();
$fireStation = DB::table('fireStations')->where("id", '=', $userData->fireStationID)->first();
$test->wniosekNadaniePDF($userData, $request->decoration, $fireStation);
}
@ -62,11 +62,11 @@ class documentApplicationController extends Controller
->select('users.id','users.name', 'users.surname', 'users.PESEL', 'users.fireStationID','users.phoneNumber', 'users.email', 'ranks.rank', 'unitFunctions.unitFunction', 'users.number')
->first();
$userTrainings = DB::table('trainingsfirefighters')->where("trainingsfirefighters.firefighterID", '=', $request->fireFighterID)
->leftJoin('trainings', 'trainingsfirefighters.trainingID', '=', 'trainings.id')
$userTrainings = DB::table('trainingsFirefighters')->where("trainingsFirefighters.firefighterID", '=', $request->fireFighterID)
->leftJoin('trainings', 'trainingsFirefighters.trainingID', '=', 'trainings.id')
->get();
$fireStation = DB::table('firestations')->where("id", '=', $userData->fireStationID)->first();
$fireStation = DB::table('fireStations')->where("id", '=', $userData->fireStationID)->first();
$test->kartaEwidencyjnaPDF($userData, $fireStation, $userTrainings);
}