This commit is contained in:
@@ -3,9 +3,12 @@
|
||||
namespace App\Models;
|
||||
|
||||
use CodeIgniter\Model;
|
||||
use App\Models\Concerns\SchoolYearAutoFillTrait;
|
||||
|
||||
class IpAttemptModel extends Model
|
||||
{
|
||||
use SchoolYearAutoFillTrait;
|
||||
|
||||
protected $table = 'ip_attempts';
|
||||
protected $primaryKey = 'id';
|
||||
|
||||
@@ -13,7 +16,8 @@ class IpAttemptModel extends Model
|
||||
'ip_address',
|
||||
'attempts',
|
||||
'last_attempt_at',
|
||||
'blocked_until'
|
||||
'blocked_until',
|
||||
'school_year',
|
||||
];
|
||||
|
||||
// Automatically handle timestamps
|
||||
@@ -26,7 +30,8 @@ class IpAttemptModel extends Model
|
||||
'ip_address' => 'required|valid_ip|max_length[45]',
|
||||
'attempts' => 'required|integer',
|
||||
'last_attempt_at' => 'required|valid_date',
|
||||
'blocked_until' => 'permit_empty|valid_date'
|
||||
'blocked_until' => 'permit_empty|valid_date',
|
||||
'school_year' => 'required|string|max_length[20]',
|
||||
];
|
||||
|
||||
// Method to get IP attempt data by IP address
|
||||
|
||||
Reference in New Issue
Block a user