Files
Website/app/Models/Post.php
2023-01-24 15:13:03 +10:00

39 lines
618 B
PHP

<?php
namespace App\Models;
use App\Traits\Uuids;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Post extends Model
{
use HasFactory;
use Uuids;
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'title',
'slug',
'publish_at',
'content',
'user_id',
'hero'
];
/**
* Get the file user
*
* @return BelongsTo
*/
public function user()
{
return $this->belongsTo(User::class);
}
}