first commit

This commit is contained in:
2026-06-10 10:46:22 +05:45
commit 473bdd627b
136 changed files with 19074 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class GameShot extends Model
{
protected $fillable = [
'game_session_id',
'shot_number',
'result',
];
/*
|---------------------------
| Relationships
|---------------------------
*/
// Each shot belongs to a session
public function session()
{
return $this->belongsTo(GameSession::class, 'game_session_id');
}
/*
|---------------------------
| Helper methods
|---------------------------
*/
// Check if this shot is a goal
public function isGoal()
{
return (bool) $this->result;
}
}