2016-12-08 3 views
2

Laravel 내에서 Post 및 Model :: create 함수를 실행할 때 아래 오류로 반갑습니다. TaskQueue.php 오류 - Laravel 5 & Forge

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

내 로컬 컴퓨터에 완벽하게 잘 작동했지만 곧 웹 사이트 포지와 서버에 넣어으로이 오류를 표시하기 시작했다.

서버가 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"클래스가 원인이라는 것을 발견했습니다./공급 업체/guzzlehttp/약속/src에

  • 편집 TaskQueue.php
  • 수정에 "클래스 작업 대기열" "클래스 작업 대기열이 TaskQueueInterface 구현"
    1. 폴더를 엽니 다

      다음

      내 솔루션입니다

    위 작업을 수행 한 후 공식 출시일을 지켜보십시오.

  • +1

    완벽하게 작동했습니다. 감사합니다. –

    +0

    오, 오. 이것은 효과가 있지만, 왜? – markashworth

    +0

    그 수업을 찾을 수 없기 때문에 저자의 부주의 한 실수 일 수 있습니다. –