为什么从控制器中的数据库获取数据时出现此错误?我使用 laravel 5.5 和 php 7.2.2。
public function create()
{
$categories = Category::all();
return view('post.create'), compact('categories');
}
“解析错误:语法错误,意外',',期待';'”返回视图('post.create'),紧凑('类别');
请帮助我,我不知道为什么会出现此错误。