我有一些问题在这里。我想查看所有数据排序由"kelompok"。
- kelompok平均值组
这是密码:
- 主计长**
public function pengelompokan()
{
$view = DB::table('tb_siswa')->where('id', $kelompok)->get();
return view('pengelompokan')
->with('view', $view);
}
- 路线**
Route::get('kelompok', 'belajarController@kelompok');
3条答案
按热度按时间ef1yzkbh1#
可以使用
groupBy
收集方法:根据您的注解,您可以执行以下操作:
wgxvkvu92#
下面是解决此问题的代码
您也可以在刀片上使用变量
$view
访问groupBy
数据。k10s72fa3#
我使用的是路由,但您可以在Controller@show上应用它
并检查您的show.blade.php