나는이 주제와 관련하여 이상한 문제를 언급했다. 나는 그것을 "스스로"풀었지만 누구도이 문제를 이해한다면 논의하고 싶었다.Laravel Eloquent PHP 버전 문제 (5.6 vs 7.0)
$image = (ProductImage::all()->where('productHistory_id', $product->history_id))->first();
을 그리고 syntax error, unexpected '->' (T_OBJECT_OPERATOR)
가 발생합니다
이 쿼리는 PHP 7.0과 함께 잘 작동합니다.
(괄호 제외)이 쿼리는 PHP 7.0 및 5.6와 잘 작동 :
$image = ProductImage::all()->where('productHistory_id', $product->history_id)->first();
whaaaat!
안부, 니코