How to use Laravel app name in blade

Asked by: alf93
Date:
Viewed: 492
Answers: 1
  • 0

Hi,

I want to store the APP_NAME in a javascript variable in my blade file.

I’m using it like this:

let site_title = "{{ env('APP_NAME') }}";

 

but i’m getting a syntax error.

Answers

Answer by: ChristianKovats

Answered on: 30 Jan 2023

  • 0

Try it like this

let site_title = "{{ config('app.name') }}";

Please log in to post an answer!