使用 数据库缓存

This commit is contained in:
iVampireSP.com 2023-01-10 22:27:03 +08:00
parent 9fe4df68b8
commit 56dffd297f
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132
2 changed files with 5 additions and 1 deletions

View File

@ -2,12 +2,13 @@
namespace App\Models;
use GeneaLabs\LaravelModelCaching\Traits\Cachable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class ModuleAllow extends Model
{
// use HasFactory;
use Cachable;
protected $fillable = [
'module_id',

View File

@ -3,12 +3,15 @@
namespace App\Models;
use Carbon\Carbon;
use GeneaLabs\LaravelModelCaching\Traits\Cachable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Support\Facades\Cache;
class UserGroup extends Model
{
use Cachable;
public $fillable = [
'name',
'color',