1 | <?php |
||
19 | class AuthController extends Controller |
||
20 | { |
||
21 | /* |
||
22 | |-------------------------------------------------------------------------- |
||
23 | | Registration & Login Controller |
||
24 | |-------------------------------------------------------------------------- |
||
25 | | |
||
26 | | This controller handles the registration of new users, as well as the |
||
27 | | authentication of existing users. By default, this controller uses |
||
28 | | a simple trait to add these behaviors. Why don't you explore it? |
||
29 | | |
||
30 | */ |
||
31 | |||
32 | use AuthenticatesAndRegistersUsers{ |
||
33 | postLogin as postLoginOriginal; |
||
34 | } |
||
35 | use ThrottlesLogins; |
||
36 | |||
37 | protected $redirectPath = "/"; |
||
38 | |||
39 | /** |
||
40 | * cn = company normal |
||
41 | * @var array |
||
42 | */ |
||
43 | protected $custom = ['mode'=>'cn']; |
||
44 | |||
45 | /** |
||
46 | * Create a new authentication controller instance. |
||
47 | * |
||
48 | */ |
||
49 | 14 | public function __construct() |
|
54 | |||
55 | /** |
||
56 | * Get a validator for an incoming registration request. |
||
57 | * |
||
58 | * @param array $data |
||
59 | * @return \Illuminate\Contracts\Validation\Validator |
||
60 | */ |
||
61 | 4 | protected function validator(array $data) |
|
69 | |||
70 | /** |
||
71 | * Create a new user instance after a valid registration. |
||
72 | * |
||
73 | * @param array $data |
||
74 | * @return Company |
||
75 | */ |
||
76 | 2 | protected function create(array $data) |
|
84 | |||
85 | 10 | public function postLogin(Request $request) |
|
97 | |||
98 | |||
99 | } |
||
100 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: