feat: Add user level and experience attributes, and implement reward, task, and quest models with corresponding controllers and migrations

This commit is contained in:
Jonas Pfalzgraf 2024-12-16 09:00:57 +01:00
parent aa50740dcb
commit fd20278948
17 changed files with 963 additions and 112 deletions

View file

@ -0,0 +1,22 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Reward extends Model
{
use HasFactory;
protected $fillable = [
'name',
'description',
'unlocked_at_level'
];
public function users()
{
return $this->belongsToMany(User::class, 'reward_user');
}
}