Topic.php 368 B

12345678910111213141516171819202122
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: Administrator
  5. * Date: 2019/6/6
  6. * Time: 11:21
  7. */
  8. namespace App\Models;
  9. use Illuminate\Database\Eloquent\Model;
  10. class Topic extends Model
  11. {
  12. //
  13. protected $table = 'topic';
  14. protected $guarded = [];
  15. public function ct()
  16. {
  17. return $this->hasMany('App\Models\CategoryTopic','topic_id','id');
  18. }
  19. }