Answers for "laravel lang file for global string"

PHP
0

laravel lang file for global string

/resources
    /lang
        /en
            messages.php
        /es
            messages.php

1. Inside messages.php
return [
    'welcome' => 'Welcome to our application',
];

2. To access the lang message
  
{{ __('messages.welcome') }} 

-----------OR----------------

@lang('messages.welcome')
Posted by: Guest on October-01-2020

Browse Popular Code Answers by Language