web/app/Models/Badge.php

28 lines
453 B
PHP

<?php
namespace App\Models;
use App\Models\User;
use Illuminate\Database\Eloquent\Model;
class Badge extends Model
{
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'name',
'description',
];
/**
* Gets the creator of this badge.
*/
public function creator()
{
return $this->belongsTo(User::class, 'creator');
}
}