wip SofaScorePlayerPosition
This commit is contained in:
1 parent
22d719aae1
commit
971d97a573
6 files changed
+328
-9
No files matched your search
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class SofaScorePlayerPosition extends Model
|
||||
{
|
||||
protected $primaryKey = 'ss_code';
|
||||
|
||||
public $incrementing = false;
|
||||
|
||||
protected $keyType = 'string';
|
||||
|
||||
protected $fillable = [
|
||||
'ss_code',
|
||||
'description',
|
||||
];
|
||||
}
|
||||
@@ -15,7 +15,6 @@ class StatistikoDetail extends Model
|
||||
protected $fillable = [
|
||||
'ss_player_id',
|
||||
'player_name',
|
||||
'tx_team_id',
|
||||
'ss_national_team_id',
|
||||
'team_name',
|
||||
'birthday',
|
||||
@@ -40,4 +39,9 @@ class StatistikoDetail extends Model
|
||||
{
|
||||
return $this->hasMany(SofaScorePlayerPerSeason::class, 'ss_player_id', 'ss_player_id');
|
||||
}
|
||||
|
||||
public function ss_code()
|
||||
{
|
||||
return $this->belongsTo(SofaScorePlayerPosition::class, 'position', 'ss_code');
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user