@@ -20,8 +20,8 @@ |
||
20 | 20 | */ |
21 | 21 | public function getProfile(Applicant $applicant) |
22 | 22 | { |
23 | - $applicant->loadMissing('applicant_classifications'); |
|
24 | - return new ApplicantProfileResource($applicant); |
|
23 | + $applicant->loadMissing('applicant_classifications'); |
|
24 | + return new ApplicantProfileResource($applicant); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | /** |
@@ -41,7 +41,7 @@ |
||
41 | 41 | $newApplicantClassifications = collect($validatedRequest['applicant_classifications'])->unique( |
42 | 42 | // Remove all duplicate classification-level combinations from the collection. |
43 | 43 | function ($newApplicantClassification) { |
44 | - return $newApplicantClassification['classification_id'].$newApplicantClassification['level']; |
|
44 | + return $newApplicantClassification['classification_id'] . $newApplicantClassification['level']; |
|
45 | 45 | } |
46 | 46 | ); |
47 | 47 | $oldApplicantClassifications = $applicant->applicant_classifications; |
@@ -97,7 +97,7 @@ |
||
97 | 97 | $segment = WhichPortal::isApplicantPortal() ? $application->job_poster->title : $application->user_name; |
98 | 98 | } |
99 | 99 | } elseif (is_object($this->request->application) && $this->request->application->id == $segment) { |
100 | - $application = $this->request->application; |
|
100 | + $application = $this->request->application; |
|
101 | 101 | $segment = WhichPortal::isApplicantPortal() ? $application->job_poster->title : $application->user_name; |
102 | 102 | } |
103 | 103 | return [ |
@@ -777,7 +777,7 @@ discard block |
||
777 | 777 | function (): void { |
778 | 778 | // This page is non-localized, because the middleware that redirects to localized |
779 | 779 | // pages changes POSTs to GETs and messes up the request. |
780 | - Route::match(['get','post'], 'jobs/create/as-manager/{manager}', 'JobController@createAsManager') |
|
780 | + Route::match(['get', 'post'], 'jobs/create/as-manager/{manager}', 'JobController@createAsManager') |
|
781 | 781 | ->middleware('can:create,App\Models\JobPoster') |
782 | 782 | ->name('admin.jobs.create_as_manager'); |
783 | 783 | |
@@ -865,7 +865,7 @@ discard block |
||
865 | 865 | ->name('jobs.setJobStatus'); |
866 | 866 | Route::resource('jobs', 'Api\JobController')->only([ |
867 | 867 | 'show', 'store', 'update', 'index' |
868 | - ])->names([ // Specify custom names because default names collided with existing routes. |
|
868 | + ])->names([// Specify custom names because default names collided with existing routes. |
|
869 | 869 | 'show' => 'jobs.show', |
870 | 870 | 'store' => 'jobs.store', |
871 | 871 | 'update' => 'jobs.update', |
@@ -894,7 +894,7 @@ discard block |
||
894 | 894 | |
895 | 895 | Route::resource('managers', 'Api\ManagerController')->only([ |
896 | 896 | 'show', 'update' |
897 | - ])->names([ // Specify custom names because default names collided with existing routes. |
|
897 | + ])->names([// Specify custom names because default names collided with existing routes. |
|
898 | 898 | 'show' => 'managers.show', |
899 | 899 | 'update' => 'managers.update' |
900 | 900 | ]); |
@@ -58,7 +58,7 @@ |
||
58 | 58 | * @return \Illuminate\Http\RedirectResponse|\Illuminate\Http\JsonResponse |
59 | 59 | */ |
60 | 60 | public function sendResetLinkEmail(Request $request) { |
61 | - if( User::where('email', $request->input('email'))->exists() ){ // Check if user exists. |
|
61 | + if (User::where('email', $request->input('email'))->exists()) { // Check if user exists. |
|
62 | 62 | Log::notice('Reset Password email requested by ' . $request->input('email')); |
63 | 63 | } |
64 | 64 | return $this->sendResetLinkEmailOverridden($request); |
@@ -21,7 +21,7 @@ |
||
21 | 21 | { |
22 | 22 | try { |
23 | 23 | //Access token from the request |
24 | - $token = JWTAuth::parseToken(); //Try authenticating user |
|
24 | + $token = JWTAuth::parseToken(); //Try authenticating user |
|
25 | 25 | $user = $token->authenticate(); |
26 | 26 | } catch (TokenExpiredException $e) { //Thrown if token has expired |
27 | 27 | return $this->unauthorized('Your token has expired. Please, login again.'); |
@@ -11,41 +11,41 @@ |
||
11 | 11 | |
12 | 12 | class JWTLoginController extends Controller |
13 | 13 | { |
14 | - public function __construct() |
|
15 | - { |
|
14 | + public function __construct() |
|
15 | + { |
|
16 | 16 | $this->middleware('guest')->except('logout'); |
17 | 17 | $this->middleware('guest:jwt')->except('logout'); |
18 | 18 | $this->middleware('guest:jwt')->except('logout'); |
19 | - } |
|
19 | + } |
|
20 | 20 | |
21 | - public function showLoginForm() |
|
22 | - { |
|
21 | + public function showLoginForm() |
|
22 | + { |
|
23 | 23 | if (WhichPortal::isManagerPortal()) { |
24 | - $home_url = route('manager.home'); |
|
24 | + $home_url = route('manager.home'); |
|
25 | 25 | } elseif (WhichPortal::isHrPortal()) { |
26 | - $home_url = route('hr_advisor.home'); |
|
26 | + $home_url = route('hr_advisor.home'); |
|
27 | 27 | } else { |
28 | - $home_url = route('home'); |
|
28 | + $home_url = route('home'); |
|
29 | 29 | }; |
30 | 30 | |
31 | 31 | return view('auth/login', [ |
32 | - 'routes' => $this->auth_routes(), |
|
33 | - 'login' => Lang::get('common/auth/login'), |
|
34 | - 'home_url' => $home_url, |
|
32 | + 'routes' => $this->auth_routes(), |
|
33 | + 'login' => Lang::get('common/auth/login'), |
|
34 | + 'home_url' => $home_url, |
|
35 | 35 | ]); |
36 | - } |
|
36 | + } |
|
37 | 37 | |
38 | - public function adminLogin(Request $request) |
|
39 | - { |
|
38 | + public function adminLogin(Request $request) |
|
39 | + { |
|
40 | 40 | $this->validate($request, [ |
41 | - 'email' => 'required|email', |
|
42 | - 'password' => 'required|min:6' |
|
41 | + 'email' => 'required|email', |
|
42 | + 'password' => 'required|min:6' |
|
43 | 43 | ]); |
44 | 44 | |
45 | 45 | if (Auth::guard('jwtusers')->attempt(['email' => $request->email, 'password' => $request->password], $request->get('remember'))) { |
46 | 46 | |
47 | - return redirect()->intended('/admin'); |
|
47 | + return redirect()->intended('/admin'); |
|
48 | 48 | } |
49 | 49 | return back()->withInput($request->only('email', 'remember')); |
50 | - } |
|
50 | + } |
|
51 | 51 | } |
@@ -26,7 +26,7 @@ |
||
26 | 26 | { |
27 | 27 | $credentials = request(['email', 'password']); |
28 | 28 | |
29 | - if (! $token = auth('jwt')->attempt($credentials)) { |
|
29 | + if (!$token = auth('jwt')->attempt($credentials)) { |
|
30 | 30 | return response()->json(['error' => 'Unauthorized'], 401); |
31 | 31 | } |
32 | 32 |