Answer the question
In order to leave comments, you need to log in
How to register the site name in the settings?
I want to set the name of the site in the settings file, so that I can then display it in the Blade templates. What is the best way to do this? It seems that adding something to config/app.php is not a good idea.
The question is in which file to register and how then to get access from the template.
Answer the question
In order to leave comments, you need to log in
Why? You can even write in a separate. For example:
// config/example.php
return [
'website_name' => 'My Website'
];
// some.blade.php
{{ config('example.website_name') }}
Don't you have this prntscr.com/g5kdbv in config/app.php ?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question