25 lines
592 B
PHP
25 lines
592 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\Pivot;
|
|
|
|
class JournalistCooperationProposal extends Pivot
|
|
{
|
|
protected $table = 'journalists_cooperation_proposals';
|
|
|
|
protected $fillable = [
|
|
'journalist_id',
|
|
'cooperation_proposal_id',
|
|
];
|
|
|
|
public function journalist(){
|
|
return $this->belongsTo(Journalist::class, 'journalists_id', 'id');
|
|
}
|
|
|
|
public function cooperationProposal(){
|
|
return $this->belongsTo(CooperationProposal::class, 'cooperation_proposal_id', 'id');
|
|
}
|
|
}
|