Am new to laravel. we are using lumen in our projects. i need to dynamically substitute a variable message defined in config.
My code
in config/messages.php
return [
'sms' => [
'otp_sms_msg' => 'Your OTP for logging into Foo APP is :otp',
],
];
and then tried replacing in flow like
config('messages.sms.otp_sms_msg', $otp);
Also as
config('messages.sms.otp_sms_msg',['otp'=>$otp]);
But none are working.All i get is static message 'Your OTP for logging into Foo APP is :otp'. OTP var isnt replaced. What am i missing?