2017-08-10 91 views
0

启动我的laravel服务器时出现以下错误。启动php artisan服务时出现错误

[Symfony\Component\Debug\Exception\FatalThrowableError] 
Parse error: syntax error, unexpected '=', expecting ']' 

我正在尝试创建一个集成了mailchimp api的web应用程序。我正在使用以下软件包。 Manage Newsletters.

现在我已经创建和laravel-newsletter.php并插入API密钥和列表的ID按照以下后connecting laravel to mailchimp

下面是我列出的API密钥和列表的ID。

<?php 

return [ 

    /* 
    * The api key of a MailChimp account. You can find yours here: 
    * https://us10.admin.mailchimp.com/account/api-key-popup/ 
    */ 
    // 'apiKey' => env('MAILCHIMP_APIKEY'), 
    'MAILCHIMP_APIKEY'='API 1234567891011121314', 

    /* 
    * When not specifying a listname in the various methods, use the list with this name 
    */ 
    'defaultListName' => 'subscribers', 

    /* 
    * Here you can define properties of the lists you want to 
    * send campaigns. 
    */ 
    'lists' => [ 

     /* 
     * This key is used to identify this list. It can be used 
     * in the various methods provided by this package. 
     * 
     * You can set it to any string you want and you can add 
     * as many lists as you want. 
     */ 
     'subscribers' => [ 

      /* 
      * A mail chimp list id. Check the mailchimp docs if you don't know 
      * how to get this value: 
      * http://kb.mailchimp.com/lists/managing-subscribers/find-your-list-id 
      */ 
      // 'id' => env('MAILCHIMP_LIST_ID'), 
      'id'='123456789', 
     ], 
    ], 

    /* 
    * If you're having trouble with https connections, set this to false. 
    */ 
    'ssl' => true, 
    ]; 
+1

' 'MAILCHIMP_APIKEY'= 'API 1234567891011121314','缺少' >'。与'id'='123456789'一样,'。 –

回答

3

它只是一个错字,上

'MAILCHIMP_APIKEY'='API 1234567891011121314', 

应该

'MAILCHIMP_APIKEY'=>'API 1234567891011121314', 

'id'=>'123456789',

+0

这与列表ID相同吗? – AltBrian

+1

@AltBrian _All_键/值对必须是:'“key”=>“value”,' –

+0

@AltBrian,如果这可以解决您的问题,您可以接受为答案 –

相关问题