<?php /** * Created by PhpStorm. * User: Administrator * Date: 2019/6/6 * Time: 11:21 */ namespace App\Models; use Illuminate\Database\Eloquent\Model; class Topic extends Model { // protected $table = 'topic'; protected $guarded = []; public function follow() { return $this->hasMany('App\Models\MemberFollowTopic', 'topic_id', 'id'); } }