php - Controller method not found when using route parameters -


i'm trying build application forces users confirm email adreses when sign up. send email, containing link this:

http://localhost:8000/verifieren/token&user=username 

now, when try visit link, following error pops on screen:

notfoundhttpexception in controller.php line 91: controller method not found. 

from stack trace, got following

at controller->missingmethod(array('verifieren', 'gilde-jowpbrhcow1fufg77xnb0kgm22cum4&user=wesley')) 

what think means tries call verifieren method?

this route i'm using:

route::get('/verifieren/{{ confirmation_code }}&user={{ username }}', 'authentication\authenticationcontroller@mailconformation'); 

and route corresponds following method:

public function mailconfirmation($code, $username) {         $user = user::where(["confirmation_code" => $code, "username" => $username])->first();          $user->active = '1';         $user->confirmation_code = null;         $user->active_date = date('y-m-d');         $user->save();          return redirect('/welkom')->with("flash_notice", "account_succesfully_activated"); } 

i have absolutely no idea why happen. thought other routes interfering, turns out wasn't that.

for me, quite new stuff, can imagine made rookie error in code.

thanks in advance.

there spelling mistake of method name in route , controller method name

in route have method name

@mailconformation 

but in controller method name

mailconfirmation($code,$username) 

so, correct spelling of method name in route :

route::get('/verifieren/{{ confirmation_code }}&user={{ username }}', 'authentication\authenticationcontroller@mailconfirmation'); 

Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -