2016-12-08 33 views
2

Laravel内のPosts and Model :: create関数を実行すると、以下のエラーが表示されます。TaskQueue.phpエラー - Laravel 5&Forge

FatalErrorException in TaskQueue.php line 13: 
Interface 'GuzzleHttp\Promise\TaskQueueInterface' not found 

これは私のローカルマシンでは問題なく動作していましたが、WebサイトがForgeでサーバーに接続されると、このエラーが表示され始めました。

サーバーがLaravelでQueue関数を使用しようとしているようですが、私のコードでこれを使用することはありません。

public function postCreateCustomer(){ 
     $input = Request::all(); 

     $customer = Customers::create([ 
      'customer_name'  => $input['customer_name'], 
      'customer_url'  => $input['customer_url'] 
     ]); 

     $password = str_random(8); 
     $pass = Hash::make($password); 

     $user = User::create([ 
      'name'  => $input['name'], 
      'email'  => $input['email'], 
      'password' => $pass, 
      'user_type' => 3, 
      'active_customer' => $customer->id, 
     ]); 

     Access::create([ 
      'user_id'  => $user->id, 
      'customer_id' => $customer->id 
     ]); 

     $the_content = '<p>Hello '.$input['name'].' ('.$input['customer_name'].'),</p> 
     <p>Thank you for creating an account. </p> 
     <p>Your login details are listed below;</p> 
     <p><strong>Username</strong>: '.$input['email'].'<p> 
     <p><strong>Password</strong>: '.$password.'<p>'; 

     $contactEmail = $input['email']; 
     Mail::send('emails.default', ['the_content' => $the_content, 'the_heading' => 'Customer Account Created'], function ($message) use ($contactEmail) { 
      $message->subject("Customer Account Created"); 
      $message->to($contactEmail); 
     }); 

     Session::flash('success_message', 'The new customer has been created.'); 
     return Redirect::to('/customers'); 
    } 

答えて

4

私は同じ問題に直面し、私はそれが "TaskQueueInterface"クラスによって見つけられなかったことがわかった。

次は私のソリューションです:

  1. は、フォルダを開く:/ベンダー/ guzzlehttp /約束/ srcに
  2. 編集TaskQueue.php
  3. は "クラスタスクキュー" に "クラスタスクキューはTaskQueueInterfaceを実装" 修正します

上記を実行した後、公式リリースのために調整してください。

+1

これは完璧に働いた、ありがとう –

+0

ああ、いいえ。これは機能しますが、なぜですか? – markashworth

+0

私はそのクラスを見つけることができないので、それはおそらく著者の間違ったミスです。 –