HovedprosjektWebApp/app/BlogPost.php

31 lines
487 B
PHP
Raw Normal View History

<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class BlogPost extends Model
{
use SoftDeletes;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'title', 'body',
];
/**
* Get the creator of the blog post.
*
* @return App\User
*/
public function user()
{
return $this->belongsTo('App\User');
}
}