How to use Laravel app name in blade

Asked by: alf93
Viewed: 381
Answers: 1
  • 0


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.


Answer by: ChristianKovats

Answered on: 30 Jan 2023

  • 0

Try it like this

let site_title = "{{ config('') }}";

Please log in to post an answer!