2
模型BadMethodCallException方法OrderBy不存在
<?php
class CommentComentario extends Illuminate\Database\Eloquent\Model {
protected $table = 'comment_comentario';
public function comercio() {
return $this->belongsTo('CommentComercio', 'comercio_id', 'id');
}
}
請求
$comercios = CommentComercio::all()->orderBy('created_at');
誤差在照射\支持產生\性狀\ Macroable.php線81
安裝目錄作曲家
{
"require": {
"slim/slim": "2.*",
"slim/extras": "*",
"illuminate/console": "*",
"illuminate/database": "*",
"illuminate/events": "*",
"illuminate/filesystem": "*",
"facebook/php-sdk-v4": "*",
"monolog/monolog": "1.*",
"twig/twig": "*",
"phpmailer/phpmailer": "~5.2"
},
"autoload": {
"classmap": [ "models" ]
}
}
如果您在帖子正文中將疑問重述爲問題,最好。這將有助於人們確定你需要什麼。 – diatrevolo
我遇到同樣的問題。你過去了嗎? – fadz