diff --git a/app/Http/Controllers/documentCreators.php b/app/Http/Controllers/documentCreators.php index fc5f3e4..706f25d 100644 --- a/app/Http/Controllers/documentCreators.php +++ b/app/Http/Controllers/documentCreators.php @@ -195,7 +195,7 @@ class documentCreators extends Fpdf exit; } - public function createSingleUnitPDF(){ + public function createSingleUnitPDF2(){ $fireStation = fireStation::find(auth()->user()->fireStationID); $pdf = new AlphaPDF(); $fill = false; diff --git a/app/Http/Controllers/fireStationController.php b/app/Http/Controllers/fireStationController.php index e33fc70..aa02311 100644 --- a/app/Http/Controllers/fireStationController.php +++ b/app/Http/Controllers/fireStationController.php @@ -34,7 +34,7 @@ class fireStationController extends Controller return view('fireStationEdit', ["fireStation" => $fireStation], compact('voivodeships')); } else - return redirect()->to('/jednostka'); + return redirect()->to('/jednostka'); } public function store() @@ -160,7 +160,7 @@ class fireStationController extends Controller if (auth()->user() != null && auth()->user()->fireStationID != null) { $request = request(); $test = new documentCreators(); - $test->createSingleUnitPDF($request->fireStationID); + $test->createSingleUnitPDF2($request->fireStationID); } } } diff --git a/routes/web.php b/routes/web.php index d1b61a3..390c26a 100644 --- a/routes/web.php +++ b/routes/web.php @@ -57,7 +57,7 @@ Route::post('/strazacy', 'fireFightersController@store'); Route::get('/strazacy/edit/{id}', 'fireFightersController@editForm'); Route::post('/strazacy/edit', 'fireFightersController@update'); Route::post('/strazacy/pdf/single/', 'fireFightersController@createSingleFireFighterPDF'); -Route::post('/strazacy/pdf/all/', 'fireFightersController@CreateAllFireFightersPDF'); +Route::post('/strazacy/pdf/all', 'fireFightersController@CreateAllFireFightersPDF'); Route::post('strazacy/activate', 'fireFightersController@activate'); Route::post('strazacy/deactivate', 'fireFightersController@deactivate'); @@ -71,7 +71,7 @@ Route::get('/jednostka', 'fireStationController@create'); Route::post('/jednostka', 'fireStationController@store'); Route::get('/jednostka/edit', 'fireStationController@editForm'); Route::post('/jednostka/edit', 'fireStationController@update'); -Route::post('/jednostka/pdf/single/', 'fireStationController@createSingleUnitPDF'); +Route::post('/jednostka/pdf/single', 'fireStationController@createSingleUnitPDF'); Route::get('/jednostka/getcounties/{id}','DataController@getCounties'); Route::get('/jednostka/getcommunities/{id}','DataController@getCommunities');