Tag.php 217 B

12345678910111213141516
  1. <?php
  2. namespace App;
  3. use Illuminate\Database\Eloquent\Model;
  4. class Tag extends Model
  5. {
  6. //
  7. protected $fillable = ['tag'];
  8. public function posts(){
  9. return $this->belongsToMany('App\Post');
  10. }
  11. }