diff options
Diffstat (limited to 'api/Posts/Models/MediaPost.php')
-rw-r--r-- | api/Posts/Models/MediaPost.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/api/Posts/Models/MediaPost.php b/api/Posts/Models/MediaPost.php new file mode 100644 index 0000000..e6f1629 --- /dev/null +++ b/api/Posts/Models/MediaPost.php @@ -0,0 +1,28 @@ +<?php + +namespace Api\Posts\Models; + +use Laravel\Passport\HasApiTokens; +use Illuminate\Notifications\Notifiable; +use Illuminate\Database\Eloquent\Model; + +class MediaPost extends Model +{ + use HasApiTokens, Notifiable; + + protected $table = "media_posts"; + + /** + * The attributes that are mass assignable. + * + * @var array + */ + protected $fillable = [ + 'description', 'media_path' + ]; + + public function post() + { + return $this->belongsTo('Api\Posts\Models\Post'); + } +} |