How to get the application name in laravel?

From laravel version 5.3^ there is a function to call the app name

config('app.name');

You can change the default name ‘Laravel’ inside this file

config/app.php

'name' => 'Laravel',

And also inside .env file

APP_NAME=your_app_name

for latter to work, in config/app.php the line where you set the name should be written like this: 'name' => env('APP_NAME', 'fallback_app_name'),

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)