コード例 #1
0
ファイル: ShootController.php プロジェクト: elconejito/bang
 public function showBullets($id)
 {
     return view('shoots.index', ['shoots' => Shoot::where('bullet_id', $id)->get()]);
 }
コード例 #2
0
ファイル: Firearm.php プロジェクト: elconejito/bang
 public function totalRoundsFired()
 {
     return Shoot::where('firearm_id', $this->id)->sum('rounds');
 }