refactor: replace custom CRM with Monica fork
Some checks failed
Build & Push Monica Image to Gitea Registry / build-and-push (push) Failing after 9s
Some checks failed
Build & Push Monica Image to Gitea Registry / build-and-push (push) Failing after 9s
This commit is contained in:
33
app/Models/User/RecoveryCode.php
Normal file
33
app/Models/User/RecoveryCode.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\User;
|
||||
|
||||
use App\Models\ModelBinding as Model;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
|
||||
class RecoveryCode extends Model
|
||||
{
|
||||
protected $table = 'recovery_codes';
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array<string>
|
||||
*/
|
||||
protected $fillable = [
|
||||
'account_id',
|
||||
'user_id',
|
||||
'recovery',
|
||||
];
|
||||
|
||||
/**
|
||||
* Scope a query to only include unused code.
|
||||
*
|
||||
* @param Builder $query
|
||||
* @return Builder
|
||||
*/
|
||||
public function scopeUnused($query)
|
||||
{
|
||||
return $query->where('used', 0);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user