123456789101112131415161718192021 |
- <?php
- namespace App;
- use Illuminate\Database\Eloquent\Model;
- class Post extends Model
- {
- //
- protected $fillable = ['text', 'title'];
- public function comments(){
- return $this->hasMany('App\Comment');
- }
- public function tags(){
- return $this->belongsToMany('App\Tag');
- }
- }
|