Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel trans with parameters

//Laravel message localization uses named, not numeric, parameters.

//Rewriting your example message:

'string1' => 'Welcome :user, Please meet :other',
//You can now use, for example:

trans('string1', [ 'user' => 'Ainsley', 'other' => 'Hayden' ]);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #laravel #trans #parameters
ADD COMMENT
Topic
Name
5+9 =