Added necessary stuff for authentication

This commit is contained in:
2025-12-11 20:42:30 +00:00
parent a335e713ee
commit d7a6862dcb
6 changed files with 307 additions and 6 deletions
+15
View File
@@ -3,9 +3,24 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use App\Http\Requests\StoreGameRequest;
class Game extends Model
{
protected $fillable = [
'player1_id',
'player2_id',
'winner_id',
'type',
'status',
'began_at',
'ended_at',
'total_time',
'player1_moves',
'player2_moves',
];
public function winner()
{
return $this->belongsTo(User::class, "winner_user_id");