Archived
How to access this config in Laravel ?
< ?php
// config/app.php
return [
‘name’ => ‘My project name’
];
0
Community Evaluations
Incorrect answer
Grégory26/04/2024
La réponse `config()->get('app.name')` est correcte (mais marquée comme incorrecte) :
```text
Psy Shell v0.12.3 (PHP 8.3.2-1+ubuntu22.04.1+deb.sury.org+1 — cli) by Justin Hileman
> config()->get('app.name')
= "Laravel"
```
La fonction `config` appelée sans argument renvoi l'instance de la configuration, exposant une méthode `get`
2
What are the functions included in Laravel to facilitate processing on strings, arrays, URLs, or other elements called?7
List all routes of a Laravel project19
What is the purpose of the Laravel Sanctum tool?5
How to manage an email verification system in a Laravel project?2
Which folder(s) below are present by default at the root of a new Laravel project?3
What methods are used in migration files in Laravel?2
If I'm using Laravel Octane, I should pay particular attention to the static arrays contained within my models, which will not be reset between requests.