laravel-learn-bbs/app/Models/Category.php
2018-06-10 18:04:03 +08:00

22 lines
313 B
PHP

<?php
namespace App\Models;
/**
* Class Category
* @property int $id
* @property string $name
* @property string $description
* @package App\Models
*/
class Category extends Model
{
protected $guarded = ['id'];
public function topics()
{
return $this->hasMany(Topic::class);
}
}