@@ -3,12 +3,12 @@ |
||
3 | 3 | namespace plunner\Http\Controllers\Companies\Auth; |
4 | 4 | |
5 | 5 | use Illuminate\Http\Request; |
6 | -use plunner\Company; |
|
7 | -use plunner\GcmCompanyModel; |
|
8 | -use plunner\Http\Controllers\Controller; |
|
9 | 6 | use Tymon\JWTAuth\Support\auth\AuthenticatesAndRegistersUsers; |
10 | 7 | use Tymon\JWTAuth\Support\auth\ThrottlesLogins; |
11 | 8 | use Validator; |
9 | +use plunner\Company; |
|
10 | +use plunner\GcmCompanyModel; |
|
11 | +use plunner\Http\Controllers\Controller; |
|
12 | 12 | |
13 | 13 | /** |
14 | 14 | * Class AuthController |
@@ -61,11 +61,13 @@ |
||
61 | 61 | if ($request->input('remember', false)) { |
62 | 62 | config(['jwt.ttl' => '43200']); //30 days |
63 | 63 | $this->custom = array_merge($this->custom, ['remember' => 'true']); |
64 | - } else |
|
65 | - $this->custom = array_merge($this->custom, ['remember' => 'false']); |
|
64 | + } else { |
|
65 | + $this->custom = array_merge($this->custom, ['remember' => 'false']); |
|
66 | + } |
|
66 | 67 | $ret = $this->postLoginOriginal($request); |
67 | - if($ret->getStatusCode() == 200) |
|
68 | - Company::whereEmail($request->input('email'))->first()->gcms()->save(new GcmCompanyModel($request->input('token'))); |
|
68 | + if($ret->getStatusCode() == 200) { |
|
69 | + Company::whereEmail($request->input('email'))->first()->gcms()->save(new GcmCompanyModel($request->input('token'))); |
|
70 | + } |
|
69 | 71 | return $ret; |
70 | 72 | } |
71 | 73 |