dficoins
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

21 lines
483 B

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Cache;
class AgentGrade extends Model
{
protected $table = 'agent_grade';
protected $primaryKey = 'id';
protected $guarded = [];
public static function getCachedGradeOption()
{
return Cache::remember('agent_grade_option', 60, function () {
return self::query()->orderBy('key', 'asc')->pluck('value', 'key')->toArray();
});
}
}