feat(preferences): added preferences model and helper to get and set them
This commit is contained in:
parent
d5abe92eb2
commit
25a1fc0c37
2 changed files with 122 additions and 0 deletions
23
app/Models/Preference.php
Normal file
23
app/Models/Preference.php
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Preference extends Model
|
||||
{
|
||||
|
||||
protected $table = 'cc_pref';
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'subjid',
|
||||
'keystr',
|
||||
'valstr'
|
||||
];
|
||||
|
||||
public function user() {
|
||||
return $this->belongsTo(User::class, 'subjid');
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue