sintonia_webapp/app/Models/Show/ShowHosts.php

29 lines
563 B
PHP

<?php
namespace App\Models\Show;
use App\Models\User;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;
class ShowHosts extends Model
{
protected $table = 'cc_show_hosts';
protected $fillable = [
'subjs_id',
'show_id'
];
public function host(): BelongsTo
{
return $this->belongsTo(User::class, 'subjs_id');
}
public function show(): BelongsTo
{
return $this->belongsTo(Show::class, 'show_id');
}
}