- Fitur: input pelanggaran, sistem poin, surat peringatan otomatis, SP progress - Realtime notifikasi via Laravel Reverb + Echo - Dashboard statistik, manajemen user, manajemen master data - Login 2 kolom premium, user dropdown, pengaturan akun - Tema biru kalem, logo sekolah dinamis, sidebar brand dinamis - Sinkronisasi siswa dari Database Kesiswaan via API
28 lines
554 B
PHP
28 lines
554 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class SpThreshold extends Model
|
|
{
|
|
protected $fillable = [
|
|
'name', 'slug', 'min_points', 'max_points',
|
|
'color', 'default_description', 'is_active',
|
|
];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'min_points' => 'integer',
|
|
'max_points' => 'integer',
|
|
'is_active' => 'boolean',
|
|
];
|
|
}
|
|
|
|
public function spLetters()
|
|
{
|
|
return $this->hasMany(SpLetter::class, 'sp_threshold_id');
|
|
}
|
|
}
|