2

I don't get it - when I search for this problem I get told to do the followng:

composer dump-autoload php artisan config:clear php artisan cache:clear php artisan view:clear

And yet it is not making a difference. In my .env file: PASS_DOMAIN=domain.local

In my /config/app.php file: 'pass_domain' => env('PASS_DOMAIN', 'example.com'),

Yet in my middleware located in /app/Http/Middleware/ if I place the following:

dd(config('pass_domain'));

I get nothing. Why cant I access this variable? Originally I had env('pass_domain') but nothing is letting me see this damn variable.

Any help?

2
  • If I'm not mistaken, you should be using config('app.pass_domain'). Note that the config file is specified as a part of the key. Commented Apr 3, 2018 at 10:13
  • config('file.key') Commented Apr 3, 2018 at 10:13

1 Answer 1

4

Try this

dd(config('app.pass_domain'));
Sign up to request clarification or add additional context in comments.

2 Comments

Yay, thank you. I didn't know that I had to reference it like that.
@Chud37 Me neither before using ones and thank you too :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.