Der Inhalt der Antwort muss eine Zeichenfolge oder ein Objekt sein, das __toString () implementiert. Der Wert "boolean" wird nach dem Verschieben nach psql @ angegebe

Sobald ich meine Laravel-App von MySQL auf pSQL verschiebe. Ich habe diesen Fehler immer wieder bekommen.

Der Inhalt der Antwort muss eine Zeichenfolge oder ein Objekt sein, das __toString () implementiert, wobei "boolean" angegeben wird.

Ich habe eine API, die meine Werbung zurückgeben soll

http: // localhost: 8888 / api / promotion / 1

public function id($id){
    $promotion = Promotion::find($id);
    dd($promotion); //I got something here
    return $promotion;
}

Früher gab es meine Werbung zurück, jetzt gab es einen Fehler zurück.

dd ($ promotion);

I got 

Promotion {#410 ▼
  #table: "promotions"
  #connection: null
  #primaryKey: "id"
  #perPage: 15
  +incrementing: true
  +timestamps: true
  #attributes: array:16 [▼
    "id" => 1
    "cpe_mac" => "000D6721A5EE"
    "name" => "qwrqwer"
    "type" => "img_path"
    "status" => "Active"
    "heading_text" => "qwerq"
    "body_text" => "werqwerqw"
    "img" => stream resource @244 ▶}
    "img_path" => "/images/promotion/1/promotion.png"
    "video_url" => ""
    "video_path" => ""
    "account_id" => 1001
    "img_url" => ""
    "footer_text" => "qwerqwerre"
    "created_at" => "2016-08-04 10:53:57"
    "updated_at" => "2016-08-04 10:53:59"
  ]
  #original: array:16 [▶]
  #relations: []
  #hidden: []
  #visible: []
  #appends: []
  #fillable: []
  #guarded: array:1 [▶]
  #dates: []
  #dateFormat: null
  #casts: []
  #touches: []
  #observables: []
  #with: []
  #morphClass: null
  +exists: true
  +wasRecentlyCreated: false
}
Inhal

__ Irgendwelche Hinweise / Vorschläge dazu werden eine große Hilfe sein!

Antworten auf die Frage(3)

Ihre Antwort auf die Frage