Advertisement
Guest User

Untitled

a guest
Dec 9th, 2021
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. $users = DB::table('serins')
  2. ->join('nomina_user', 'nomina_user.id', 'serins.nominau_id')
  3. ->where('nomina_user.user_id', Auth::id())
  4. ->selectRaw('COUNT(*) as count')
  5. ->whereYear('fecha', date('Y'))
  6. ->groupBy(DB::raw("MONTH(fecha)"))
  7. ->pluck('count');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement