Added necessary stuff for authentication
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user