@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | * cn = company normal |
41 | 41 | * @var array |
42 | 42 | */ |
43 | - protected $custom = ['mode' => 'cn']; |
|
43 | + protected $custom = [ 'mode' => 'cn' ]; |
|
44 | 44 | |
45 | 45 | /** |
46 | 46 | * Create a new authentication controller instance. |
@@ -48,19 +48,19 @@ discard block |
||
48 | 48 | */ |
49 | 49 | public function __construct() |
50 | 50 | { |
51 | - config(['auth.model' => \plunner\Company::class]); |
|
52 | - config(['jwt.user' => \plunner\Company::class]); |
|
51 | + config([ 'auth.model' => \plunner\Company::class ]); |
|
52 | + config([ 'jwt.user' => \plunner\Company::class ]); |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | public function postLogin(Request $request) |
56 | 56 | { |
57 | 57 | //remember me |
58 | - $this->validate($request, ['remember' => 'required|boolean']); |
|
58 | + $this->validate($request, [ 'remember' => 'required|boolean' ]); |
|
59 | 59 | if ($request->input('remember', false)) { |
60 | - config(['jwt.ttl' => '43200']); //30 days |
|
61 | - $this->custom = array_merge($this->custom, ['remember' => 'true']); |
|
60 | + config([ 'jwt.ttl' => '43200' ]); //30 days |
|
61 | + $this->custom = array_merge($this->custom, [ 'remember' => 'true' ]); |
|
62 | 62 | } else |
63 | - $this->custom = array_merge($this->custom, ['remember' => 'false']); |
|
63 | + $this->custom = array_merge($this->custom, [ 'remember' => 'false' ]); |
|
64 | 64 | return $this->postLoginOriginal($request); |
65 | 65 | } |
66 | 66 | |
@@ -88,9 +88,9 @@ discard block |
||
88 | 88 | protected function create(array $data) |
89 | 89 | { |
90 | 90 | return Company::create([ |
91 | - 'name' => $data['name'], |
|
92 | - 'email' => $data['email'], |
|
93 | - 'password' => bcrypt($data['password']), |
|
91 | + 'name' => $data[ 'name' ], |
|
92 | + 'email' => $data[ 'email' ], |
|
93 | + 'password' => bcrypt($data[ 'password' ]), |
|
94 | 94 | ]); |
95 | 95 | } |
96 | 96 |