diff --git a/app/Http/Controllers/DataController.php b/app/Http/Controllers/DataController.php index 1a75fa7..2b1763b 100644 --- a/app/Http/Controllers/DataController.php +++ b/app/Http/Controllers/DataController.php @@ -7,11 +7,13 @@ use DB; class DataController extends Controller { + /* public function getVoivodeships() { $voivodeships = DB::table('wojewodztwa')->pluck("name","id"); return view('unit',compact('voivodeships')); } + */ public function getCounties($id) { diff --git a/app/Http/Controllers/fireStationController.php b/app/Http/Controllers/fireStationController.php index 86f52cf..f446c8d 100644 --- a/app/Http/Controllers/fireStationController.php +++ b/app/Http/Controllers/fireStationController.php @@ -5,7 +5,7 @@ namespace App\Http\Controllers; use Illuminate\Http\Request; use App\fireStation; - +use DB; class fireStationController extends Controller { @@ -14,7 +14,9 @@ class fireStationController extends Controller $fireStation = fireStation::find(auth()->user()->fireStationID); return view('unit', ["fireStation" => $fireStation]); } else{ - return view('unit'); + $voivodeships = DB::table('wojewodztwa')->pluck("name","id"); + return view('unit',compact('voivodeships')); + //return view('unit'); } } public function store() diff --git a/routes/web.php b/routes/web.php index 5f66e13..fb15870 100644 --- a/routes/web.php +++ b/routes/web.php @@ -51,7 +51,6 @@ Route::get('/strazacy', 'fireFightersController@create'); Route::get('/strazacy/add', 'fireFightersController@addForm'); Route::post('/strazacy', 'fireFightersController@store'); -Route::get('/jednostka','DataController@getVoivodeships'); Route::get('/jednostka/getcounties/{id}','DataController@getCounties'); Route::get('/jednostka/getcommunities/{id}','DataController@getCommunities');