From 27132a668fde9228908a636a2fb9e07c4fc6f886 Mon Sep 17 00:00:00 2001 From: Maciej Rymarz Date: Fri, 19 Jan 2024 14:12:09 +0100 Subject: [PATCH] Add QueryCachable trait --- src/Models/H5PContent.php | 3 ++- src/Models/H5PContentLibrary.php | 3 ++- src/Models/H5PLibrary.php | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Models/H5PContent.php b/src/Models/H5PContent.php index 1d8c8c07..50b65827 100644 --- a/src/Models/H5PContent.php +++ b/src/Models/H5PContent.php @@ -2,6 +2,7 @@ namespace EscolaLms\HeadlessH5P\Models; +use EscolaLms\Core\Models\Traits\QueryCacheable; use EscolaLms\Core\Models\User; use EscolaLms\HeadlessH5P\Database\Factories\H5PContentFactory; use Illuminate\Database\Eloquent\Factories\HasFactory; @@ -89,7 +90,7 @@ class H5PContent extends Model { - use HasFactory; + use HasFactory, QueryCacheable; protected $table = 'hh5p_contents'; diff --git a/src/Models/H5PContentLibrary.php b/src/Models/H5PContentLibrary.php index 9a8946db..737be904 100644 --- a/src/Models/H5PContentLibrary.php +++ b/src/Models/H5PContentLibrary.php @@ -2,6 +2,7 @@ namespace EscolaLms\HeadlessH5P\Models; +use EscolaLms\Core\Models\Traits\QueryCacheable; use EscolaLms\HeadlessH5P\Database\Factories\H5PContentLibraryFactory; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; @@ -9,7 +10,7 @@ class H5PContentLibrary extends Model { - use HasFactory; + use HasFactory, QueryCacheable; public $incrementing = false; diff --git a/src/Models/H5PLibrary.php b/src/Models/H5PLibrary.php index cb848bc6..fa99ed9d 100644 --- a/src/Models/H5PLibrary.php +++ b/src/Models/H5PLibrary.php @@ -2,6 +2,7 @@ namespace EscolaLms\HeadlessH5P\Models; +use EscolaLms\Core\Models\Traits\QueryCacheable; use EscolaLms\HeadlessH5P\Database\Factories\H5PLibraryFactory; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; @@ -117,7 +118,7 @@ class H5PLibrary extends Model { - use HasFactory; + use HasFactory, QueryCacheable; protected $table = 'hh5p_libraries';