czyszczenie starego kodu

This commit is contained in:
Krzysztof Strzelecki 2020-07-20 14:42:50 +02:00
parent 66ac47c031
commit c7dfa83343

View File

@ -49,12 +49,10 @@ class fireFightersController extends Controller
$fireStationCreatorId = DB::table('fireStations')->where("id", $userFireStation)->value('creatorID'); $fireStationCreatorId = DB::table('fireStations')->where("id", $userFireStation)->value('creatorID');
$fireFighter = DB::table('users')->where("id", $id)->first(); $fireFighter = DB::table('users')->where("id", $id)->first();
if($userFireStation == $fireFighterFireStation && auth()->user()->id == $fireStationCreatorId) { // if do usunięcia w pzyszłości
return view('fireFightersEdit', ["fireFighter" => $fireFighter]); return view('fireFightersEdit', ["fireFighter" => $fireFighter]);
} else{
return "Brak dostepu";
} }
}else{ else
{
return redirect()->to('/strazacy'); return redirect()->to('/strazacy');
} }
} }