0

I am trying to get Mailgun to work as my email provider.

By adding the services.php page into app/config and filling in the credentials, I'm left with this:

<?php
'mailgun' => array(
    'domain' => 'domain.com',
    'secret' => 'key-removedforprivacy',
),

When I go to execute a Mail:: function, it returns this error:

syntax error, unexpected '=>' (T_DOUBLE_ARROW)

It relates to this line:

'mailgun' => array(

If I remove <?php, it actually gets past this step, but returns the error where it can't find the array with the domain and secret values.

I've copied the code from Laravel's website! Any help would be greatly appreciated.

1 Answers1

1

What you have so far is not valid PHP (The interpreter is correct. It's always correct.)

I think this is what you're trying to do

<?php
return array(
    'mailgun' => array(
        'domain' => 'domain.com',
        'secret' => 'key-removedforprivacy',
    ),
);
Jeff Lambert
  • 24,395
  • 4
  • 69
  • 96