Postag.php 349 B

12345678910111213141516171819202122
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class Postag extends Model
  5. {
  6. /**
  7. * The attributes that are mass assignable.
  8. *
  9. * @var array
  10. */
  11. protected $fillable = [
  12. 'name','category'
  13. ];
  14. public function posts()
  15. {
  16. return $this->hasMany('App\Models\Annotation');
  17. }
  18. }