A lot of things.
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
class Platform extends Model
|
||||
{
|
||||
@@ -14,4 +15,13 @@ class Platform extends Model
|
||||
'name', 'slug', 'short_name'
|
||||
];
|
||||
|
||||
public function games(): HasMany
|
||||
{
|
||||
return $this->hasMany(Game::class);
|
||||
}
|
||||
|
||||
public function entries(): HasMany
|
||||
{
|
||||
return $this->hasMany(Entry::class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user