26 lines
463 B
PHP
26 lines
463 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Models;
|
||
|
|
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
use App\Models\Base;
|
||
|
|
class MomentTopic extends Base
|
||
|
|
{
|
||
|
|
//
|
||
|
|
public function moment(){
|
||
|
|
return $this->hasMany(Moment::class, 'topic_id');
|
||
|
|
}
|
||
|
|
|
||
|
|
public function myMoment(){
|
||
|
|
return $this->hasMany(Moment::class, 'topic_id');
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
public function momentTopicsActivities(){
|
||
|
|
return $this->hasOne(MomentTopicsActivities::class, 'topic_id','id');
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
}
|