Level 32
nice, can you show any way to pass value on @Hears annotation method?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
More of a reminder than a tip, but I keep forgetting so I thought I would share with all. If you are using PHP annotations and then redirect, don't forget to add param to destination annotation. Example:
/**
* @Get("account/activate/{code}", as="getActivate")
* @Middleware("guest")
*/
public function getActivate($code) {
$user = User::where('code','=', $code)->first();
return Redirect::route('getSuccess', [$user->first_name]);
}
/**
* @Get("success/{firstName}", as="getSuccess")
*/
public function authSuccess($firstName)
{
// stuff
}
Please or to participate in this conversation.