Hi ?I am just learning to use Laravel framework and having trouble understanding how to use the values stored in the .env
file. I have created a template application using artisan
and it works.
In the default welcome blade is the code
<div class="title m-b-md">
Laravel <--/*this text needs to change */
</div>
In the file .env
is the lines:
APP_NAME=SomeAppName
APP_ENV=local
APP_KEY=base64:zUm/qFNKTV4gRw6bFcIdOfm5rTzrS8JP1bj2KIz8Rl4=
APP_DEBUG=true
APP_URL=http://localhost
How do i reference the .env
file so that the welcome page shows the value of APP_NAME
("SomeAppName") instead of "Laravel"?
p.s have tried {{ getenv('APP_NAME') }}
and {{ config('app.name', 'SomeAppName') }}
but former gives blank and latter still prints out "Laravel"