This question is just for me to understand what I did wrong
First Case (throws a notice):
In my UsersController I have
$this->getMailer(‘User’)->send(‘reset’, [$user]);
and in my
Usermailer.php i have:
public function reset($user) { debug($user); die(); }
This throws an error
Declaration of App\Mailer\UserMailer::reset($user) should be compatible with Cake\Mailer\Mailer::reset() [APP/Mailer/UserMailer.php, line 9]
Second case (working)
In my UsersController I have
$this->getMailer(‘User’)->send(‘resetpassword’, [$user]);
and in my
Usermailer.php i have:
public function resetpassword($user) { debug($user); die(); }
Why do I get the notice in the first case?
Can someone give me a hint or a link for further reading?