You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
348 B
PHP
18 lines
348 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Model;
|
|
|
|
class BaseGame extends Model
|
|
{
|
|
protected $table = 'tab_base_game';
|
|
|
|
public function scopeHasChild($query, $game)
|
|
{
|
|
return $query->where(function ($q) use($game) {
|
|
$q->orWhere('android_game_id', $game->id)->orWhere('ios_game_id', $game->id);
|
|
});
|
|
}
|
|
}
|