Support the ongoing development of Laravel.io →
Configuration Mail
Last updated 2 years ago.
0

Laravel 4 or 5?

Laravel 4: Just at a quick glance it looks like your config file is in the wrong place, it should app/config/development/email.php

Laravel 5: It no longer supports cascading configs or subdirectories per environment you would need to configure it via environment variables.

0

Ooops sorry yes it is under

/app/config/

I'm using Laravel 4.2

By the way should I skip Laravel 4 and start studying 5 ?

Thanks

0

Are you using Homestead?

Chances are Laravel is not picking up your environment based on your hostname possibly.

What does this return when you place it in your route?

dd(App::environment());
0

@Kusie

thanks for replying dude. Any way when I call the codes below,

dd(App:environment());

It display this below

string(11) "development"
0
Solution

Well it is detecting your environment correctly which is good.

But i believe the file is called mail.php not email.php Give this a try:

Route::get('emaildriver', function()
{
    dd(Config::get('mail.driver'));
});
0

@Kussie

wow I did not noticed that. thanks dude it's working now.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

iridion9 iridion9 Joined 9 Jun 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.