这个问题我以前就发现了,不过如果你懂一点PHP和laravel框架的话,可以自己修改控制器
我贴一下我修改的控制器IndexController.php 修改第157行,仅供参考
public function topic( $categorySlug='all')
{
$currentCategoryId = 0;
if( $categorySlug != 'all' ){
$category = Category::where("slug","=",$categorySlug)->first();
if(!$category){
abort(404);
}
$currentCategoryId = $category->id;
}
$categories = load_categories('tags');
if ($currentCategoryId > 0 ){
$topics = Tag::where("category_id","=",$currentCategoryId)->orderBy('followers','DESC')->paginate(20);
}
else{
$topics = Tag::where("category_id",">=",0)->orderBy('followers','DESC')->paginate(20);
}
return view('theme::home.topic')->with(compact('category','topics','categories','currentCategoryId','categorySlug'));
}
PS:我只是为了测试一下空格回复是否产生BUG,提交成功,结果还真成功了,又无法删除,为了证明我不是捣乱的人,就重新编辑认真的回复了一下