$row = sql_fetch(" select count(*) as cnt from {$g5['board_table']} where gr_id = '$gr_id' ");
위의 php코드를 라라벨로 전환해봤는데 as cnt는 어디에 어떤식으로 작성해줘야 하는건가요?
$row = DB::table($g5['board_table'])->where('gr_id',$gr_id)->count();
$row = DB::table($g5['board_table'])->select(DB::raw('count(*) as cnt'))->where('gr_id',$gr_id)->get();
위의 php코드를 라라벨로 전환해봤는데 as cnt는 어디에 어떤식으로 작성해줘야 하는건가요?