<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use DB;

class Game extends Model
{
    use HasFactory;

    protected $connection = 'mysql';
    protected $table = 'game';
    protected $primaryKey = 'id_game';
    public $incrementing = true;
    public $timestamps = false;

    public static function getAllGames() {
        $games = DB::select('select * from game');
        // $games = DB::table('game')->get();
        // $games = self::all();

        return $games;
    }
}
