Skip to content

Commit a346490

Browse files
authored
Use variables model defined in config (#370)
1 parent 28f40ec commit a346490

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Globals/GlobalVariablesRepository.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class GlobalVariablesRepository extends StacheRepository
1212
public function all(): VariablesCollection
1313
{
1414
return VariablesCollection::make(
15-
VariablesModel::all()
15+
app('statamic.eloquent.global_set_variables.model')::all()
1616
->each(function ($model) {
1717
return app(Variables::class)::fromModel($model);
1818
})
@@ -23,7 +23,7 @@ public function find($id): ?Variables
2323
{
2424
$id = Str::split($id, '::');
2525

26-
$model = VariablesModel::query()
26+
$model = app('statamic.eloquent.global_set_variables.model')::query()
2727
->where('handle', $id[0])
2828
->when(count($id) > 1, function ($query) use ($id) {
2929
$query->where('locale', $id[1]);
@@ -40,7 +40,7 @@ public function find($id): ?Variables
4040
public function whereSet($handle): VariablesCollection
4141
{
4242
return VariablesCollection::make(
43-
VariablesModel::query()
43+
app('statamic.eloquent.global_set_variables.model')::query()
4444
->where('handle', $handle)
4545
->get()
4646
->map(function ($model) {

0 commit comments

Comments
 (0)