markdown email button component use URL only, how to force named route instead Hey,
The default markdown email has this component by default
@component('mail::button', ['url' => 'http://website.com'])
{{__('translation.activate')}}
@endcomponent
as per above its only accepting URL only, Is there is a way to force named route instead of URL
you tried ?
@component('mail::button', ['url' => route('route.name')])
{{__('translation.activate')}}
@endcomponent
@Snapey i did actually try that but it didn't work then, maybe i mad some typical error or something,
Thanks anyway
@Snapey just checked the code but it not returning the correct data in the email.
@component('mail::button', ['url' => route('accountVerification'), $user->email, $user->email_verification_token])
{{__('translation.activate')}}
@endcomponent
is returning this code in the email
http://127.0.0.1:8000/en/myaccount/reVerifyEmail
where my route requiers
Route::get('/accountVerification/{email}/{token}', 'UserController@accountVerification')->name('accountVerification');
any ideas ????
Sorry, you did not say anything about additional parameters. These need to be inside the route function call
@component('mail::button', ['url' => route('accountVerification', [$user->email, $user->email_verification_token])
{{__('translation.activate')}}
@endcomponent
@Snapey Yah i did't mention any additional parameters, Sorry about that, But your last post totally solved the problem, I have implements that change and tested it LOOKS GOOD.
Thank you
Please sign in or create an account to participate in this conversation.