Skip to content

Commit

Permalink
Add QueryCachable trait
Browse files Browse the repository at this point in the history
  • Loading branch information
mako321 committed Jan 19, 2024
1 parent 780d317 commit 27132a6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/Models/H5PContent.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -89,7 +90,7 @@

class H5PContent extends Model
{
use HasFactory;
use HasFactory, QueryCacheable;

protected $table = 'hh5p_contents';

Expand Down
3 changes: 2 additions & 1 deletion src/Models/H5PContentLibrary.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@

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;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class H5PContentLibrary extends Model
{
use HasFactory;
use HasFactory, QueryCacheable;

public $incrementing = false;

Expand Down
3 changes: 2 additions & 1 deletion src/Models/H5PLibrary.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -117,7 +118,7 @@

class H5PLibrary extends Model
{
use HasFactory;
use HasFactory, QueryCacheable;

protected $table = 'hh5p_libraries';

Expand Down

0 comments on commit 27132a6

Please sign in to comment.