HovedprosjektWebApp/app/BlogPost.php
2020-03-09 14:03:08 +01:00

31 lines
487 B
PHP

<?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');
}
}