initial commit

This commit is contained in:
2026-04-13 08:16:56 +08:00
parent 610676a668
commit 273c8e8153
1270 changed files with 331207 additions and 0 deletions

30
app/Models/Setting.php Normal file
View File

@@ -0,0 +1,30 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Setting extends BaseModel
{
use HasFactory;
protected $fillable = [
'user_id',
'key',
'value',
];
/**
* Get the user that owns the setting.
*/
public function user()
{
return $this->belongsTo(User::class);
}
public static function getUserSettings($userId)
{
return self::where('user_id', $userId)->pluck('value', 'key')->toArray();
}
}