This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:3.8-slim | |
WORKDIR /load_balancer | |
COPY . /load_balancer | |
RUN pip install --no-cache-dir -r requirements.txt | |
CMD ["python", "load_balancer.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:3.8-slim | |
WORKDIR /server | |
COPY . /server | |
RUN pip install --no-cache-dir -r requirements.txt | |
EXPOSE 5000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Check if there is already a profile picture stored | |
if ($finduser->profile_picture) { | |
// Delete the existing profile picture file | |
Storage::delete($finduser->profile_picture); | |
} | |
//procedure for saving profile pictures | |
$avatarPath = 'public/avatars/employers/' . $user->id . '.jpg'; | |
$avatarContents = file_get_contents($user->getAvatar()); | |
Storage::put($avatarPath, $avatarContents); | |
$finduser->profile_picture = $avatarPath; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function accounts() | |
{ | |
if (request()->is('auth/login')) { | |
$user = Auth::user(); | |
if ($user == null) { | |
return view('auth.login'); | |
} | |
return redirect("/")->withErrors(['error' => "You are already logged in"]); | |
} elseif (request()->is('auth/registration')) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
APP_NAME="Arcadian Bank" | |
APP_ENV=local | |
APP_KEY=base64:xzdgkUE3qMUQkvT3IXvwq9hnBmnk/IAbXu6bVLt/f4s= | |
APP_DEBUG=true | |
APP_URL=http://localhost | |
LOG_CHANNEL=stack | |
LOG_DEPRECATIONS_CHANNEL=null | |
LOG_LEVEL=debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function resetPassword(Request $request) | |
{ | |
$new_password = Hash::make($request->input('new_password')); | |
$user_update = User::all()->where('id', '=', $request->input('user_id'))->first(); | |
$user_update->password = $new_password; | |
$user_update->email_verified_at = Carbon::now(); | |
$user_update->update(); | |
return redirect()->route('/')->withErrors(['msg' => 'Password Reset Successfully.']); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
// tab switching | |
function switchcommon(evt, mainName) { | |
var i, tabcontent, tablinks; | |
//get all elements under tabcontent and hide them | |
tabcontent = document.getElementsByClassName("tabcontent"); | |
for (i = 0; i < tabcontent.length; i++) { | |
tabcontent[i].style.display = "none"; | |
} | |
tablinks = document.getElementsByClassName("tablinks"); |