We also added the translations in a resources\lang\en\notifications.php like this:
return[
['visit'] => [
'checkin' => 'Hello {to.name}, {from.name} is now following you and want to let you know "{extra.message}".',
'checkout' => 'Hello {to.name}, {from.name} is now following you and want to let you know "{extra.message}".'
],
['place'] => [
'checkin' => 'Hello {to.name}, {from.name} is now following you and want to let you know "{extra.message}".',
'checkout' => 'Hello {to.name}, {from.name} is now following you and want to let you know "{extra.message}".'
]
];
Example of output:
[{"id":9,"from_id":"14","from_type":"App\\User","to_id":"5","to_type":"App\\User","category_id":1,"url":"\/","extra":{"geo_name":"Samir"},"read":0,"created_at":"2017-02-02 11:37:53","updated_at":"2017-02-02 11:37:53","expire_time":null,"stack_id":null,"text":"Erika Reichel checkin Samir","to":{"id":5,"name":"Erika Reichel","email":"pthompson@example.org","mobile_number":"(852) 294-6865 x9369","country_code":"+962","confirmation_code":"a3581408450e5eb4463bc69e450ccdea","confirmed":true,"gender":"male","profile_completed":true,"allow_users_see_me":true,"created_at":"2017-02-02 10:45:22","updated_at":"2017-02-02 10:45:23","deleted_at":null,"status":1,"parent_id":null,"position":null,"real_depth":null,"current_team_id":12,"source_lat_long":"0101000020E6100000BDC5C37B0E804DC0D00B772E8C1C2340","social_avatar_uri":null,"last_login":null,"active_invitation_id":null,"EndpointArn":null,"organization_id":1,"mobile_token":null}}]
How do we get it to output in the format of the translation template instead of the raw JSON output?
Hi :)
We have tried to refer to your translation docs, but we could not use it properly. We read the notifications like this:
We also added the translations in a
resources\lang\en\notifications.php
like this:Example of output:
[{"id":9,"from_id":"14","from_type":"App\\User","to_id":"5","to_type":"App\\User","category_id":1,"url":"\/","extra":{"geo_name":"Samir"},"read":0,"created_at":"2017-02-02 11:37:53","updated_at":"2017-02-02 11:37:53","expire_time":null,"stack_id":null,"text":"Erika Reichel checkin Samir","to":{"id":5,"name":"Erika Reichel","email":"pthompson@example.org","mobile_number":"(852) 294-6865 x9369","country_code":"+962","confirmation_code":"a3581408450e5eb4463bc69e450ccdea","confirmed":true,"gender":"male","profile_completed":true,"allow_users_see_me":true,"created_at":"2017-02-02 10:45:22","updated_at":"2017-02-02 10:45:23","deleted_at":null,"status":1,"parent_id":null,"position":null,"real_depth":null,"current_team_id":12,"source_lat_long":"0101000020E6100000BDC5C37B0E804DC0D00B772E8C1C2340","social_avatar_uri":null,"last_login":null,"active_invitation_id":null,"EndpointArn":null,"organization_id":1,"mobile_token":null}}]
How do we get it to output in the format of the translation template instead of the raw JSON output?