select * from `channels` where `channels`.`id` = '1' limit 1 语句重复原因
select * from channels
where channels
.id
= '1' limit 1 语句的出现不是导航栏的循环获取,而是$thread->path()
的原因。
public function path()
{
return '/threads/'.$this->channel->slug.'/'.$this->id;
}
将path()方法改成如下,测试下就知道了
public function path()
{
// return '/threads/'.$this->channel->slug.'/'.$this->id;
return 'test';
}
推荐文章: