some progress
This commit is contained in:
@@ -40,6 +40,8 @@ class GameList extends Model
|
||||
|
||||
public function games(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(Game::class)->withTimestamps();
|
||||
return $this->belongsToMany(Game::class)
|
||||
->with(['platforms'])
|
||||
->withTimestamps();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ class Rating extends Model
|
||||
'user_id',
|
||||
'game_id',
|
||||
'rating',
|
||||
'platform',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
@@ -29,4 +30,4 @@ class Rating extends Model
|
||||
{
|
||||
return $this->belongsTo(Game::class);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ class Review extends Model
|
||||
'content',
|
||||
'recommended',
|
||||
'rating',
|
||||
'platform',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Wishlist extends Model
|
||||
{
|
||||
public const VISIBILITY_PUBLIC = 'public';
|
||||
public const VISIBILITY_PRIVATE = 'private';
|
||||
public const VISIBILITY_FRIENDS_ONLY = 'friends_only';
|
||||
|
||||
public const VISIBILITIES = [
|
||||
self::VISIBILITY_PUBLIC,
|
||||
self::VISIBILITY_PRIVATE,
|
||||
self::VISIBILITY_FRIENDS_ONLY,
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'name',
|
||||
'description',
|
||||
'visibility',
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user