czyszczenie starego kodu
This commit is contained in:
parent
66ac47c031
commit
c7dfa83343
@ -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');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user