質問編集履歴

4

groupBy

2019/05/27 07:04

投稿

mank
mank

スコア11

test CHANGED
@@ -1 +1 @@
1
- 【Laravel】grouoByを使ったcountの方法
1
+ 【Laravel】groupByを使ったcountの方法
test CHANGED
File without changes

3

SELECTの小文字化

2019/05/27 07:04

投稿

mank
mank

スコア11

test CHANGED
File without changes
test CHANGED
@@ -24,7 +24,7 @@
24
24
 
25
25
  $date = Carbon::now();
26
26
 
27
- $plays = Play::SELECT('accountId', DB::raw('count(created_at) as total'))
27
+ $plays = Play::select('accountId', DB::raw('count(created_at) as total'))
28
28
 
29
29
  ->where('team_id', $team->id)
30
30
 

2

タイトルの修正・追記

2019/05/27 07:01

投稿

mank
mank

スコア11

test CHANGED
@@ -1 +1 @@
1
- 【Laravel】初心者です。
1
+ 【Laravel】grouoByを使ったcountの方法
test CHANGED
@@ -1,6 +1,6 @@
1
1
  ### 前提・実現したいこと
2
2
 
3
- Laravelを勉強し始めて10日くらいの初心者です。
3
+ LaravelとPHPを勉強し始めて10日くらいの初心者です。
4
4
 
5
5
  DBにアクセスしてその月のチーム内(チームは1つだけ)のユーザー毎のプレイ数をカウントして
6
6
 

1

compactのuserの抜け

2019/05/27 06:57

投稿

mank
mank

スコア11

test CHANGED
File without changes
test CHANGED
@@ -64,7 +64,7 @@
64
64
 
65
65
  $month_plays = $this->getMonthPlay($user_id,$team);
66
66
 
67
- return view('playerMember',compact('users','month_plays'));
67
+ return view('playerMember',compact('users','user','month_plays'));
68
68
 
69
69
  }
70
70