24 lines
423 B
PHP
24 lines
423 B
PHP
<?php
|
|
|
|
namespace App\Models\Traits;
|
|
|
|
use App\Models\Activity;
|
|
use App\Models\User;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
trait BelongsToActivity
|
|
{
|
|
|
|
/**
|
|
* Notes: 关联活动
|
|
* @Author: 玄尘
|
|
* @Date : 2020/6/30 9:40
|
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
|
*/
|
|
public function activity()
|
|
{
|
|
return $this->belongsTo(Activity::class);
|
|
}
|
|
|
|
}
|