1 | <?php |
||
21 | class AuthController extends Controller |
||
22 | { |
||
23 | /* |
||
24 | |-------------------------------------------------------------------------- |
||
25 | | Registration & Login Controller |
||
26 | |-------------------------------------------------------------------------- |
||
27 | | |
||
28 | | This controller handles the registration of new users, as well as the |
||
29 | | authentication of existing users. By default, this controller uses |
||
30 | | a simple trait to add these behaviors. Why don't you explore it? |
||
31 | | |
||
32 | */ |
||
33 | |||
34 | use AuthenticatesAndRegistersUsers { |
||
35 | postRegister as postRegisterOriginal; |
||
36 | postLogin as postLoginOriginal; |
||
37 | } |
||
38 | use ThrottlesLogins; |
||
39 | |||
40 | protected $redirectPath = "/"; |
||
41 | |||
42 | /** |
||
43 | * en = employee normal |
||
44 | * @var array |
||
45 | */ |
||
46 | protected $custom = ['mode' => 'en']; |
||
47 | |||
48 | /** |
||
49 | * @var company |
||
50 | */ |
||
51 | private $company = null; |
||
52 | |||
53 | /** |
||
54 | * Create a new authentication controller instance. |
||
55 | * |
||
56 | */ |
||
57 | 10 | public function __construct() |
|
62 | |||
63 | public function postRegister(Request $request) |
||
69 | |||
70 | 10 | public function postLogin(Request $request) |
|
87 | |||
88 | /** |
||
89 | * Get a validator for an incoming registration request. |
||
90 | * |
||
91 | * @param array $data |
||
92 | * @return \Illuminate\Contracts\Validation\Validator |
||
93 | */ |
||
94 | protected function validator(array $data) |
||
102 | |||
103 | /** |
||
104 | * Create a new user instance after a valid registration. |
||
105 | * |
||
106 | * @param array $data |
||
107 | * @return Company |
||
108 | */ |
||
109 | protected function create(array $data) |
||
117 | } |
||
118 |
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: