Skip to content

Commit 48291bb

Browse files
committed
Merge branch 'master' into search-updates
2 parents 28923d8 + a2745c7 commit 48291bb

File tree

6 files changed

+38
-8
lines changed

6 files changed

+38
-8
lines changed

.github/workflows/pr-title.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Pull Request Title
2+
3+
on:
4+
pull_request:
5+
types: [opened, edited, synchronize, reopened]
6+
7+
jobs:
8+
pr-title:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: deepakputhraya/action-pr-title@master
12+
with:
13+
regex: '^\[\d+\.x\]\s'

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
matrix:
1515
php: [8.3, 8.4]
16-
laravel: [11.*, 12.*]
16+
laravel: [12.*]
1717
stability: [prefer-lowest, prefer-stable]
1818
os: [ubuntu-latest]
1919

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"require": {
4343
"php": "^8.3",
4444
"ajthinking/archetype": "^1.0.3 || ^2.0",
45-
"laravel/framework": "^11.4 || ^12.0",
45+
"laravel/framework": "^12.0",
4646
"pixelfear/composer-dist-plugin": "^0.1.5",
4747
"spatie/ignition": "^1.15",
4848
"spatie/invade": "^2.1",
@@ -52,8 +52,8 @@
5252
"require-dev": {
5353
"laravel/pint": "^1.0",
5454
"spatie/test-time": "^1.2",
55-
"orchestra/testbench": "^9.2 || ^10.0",
56-
"phpunit/phpunit": "^10.5.35 || ^11.0",
55+
"orchestra/testbench": "^10.0",
56+
"phpunit/phpunit": "^11.0",
5757
"spatie/laravel-ray": "^1.40",
5858
"inertiajs/inertia-laravel": "^2.0.10"
5959
},

resources/js/components/PublishForm.vue

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,9 +341,16 @@ export default {
341341
saveKeyBinding: null,
342342
quickSaveKeyBinding: null,
343343
quickSave: false,
344+
};
345+
},
344346
345-
savingRef: ref(false),
346-
errorsRef: ref({}),
347+
setup() {
348+
const savingRef = ref(false);
349+
const errorsRef = ref({});
350+
351+
return {
352+
savingRef: computed(() => savingRef),
353+
errorsRef: computed(() => errorsRef),
347354
};
348355
},
349356

src/Relationships.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@
99
use Illuminate\Support\Arr;
1010
use Illuminate\Support\Facades\Schema;
1111
use Statamic\Fields\Field;
12+
use Statamic\Support\Traits\Hookable;
1213
use StatamicRadPack\Runway\Fieldtypes\HasManyFieldtype;
1314

1415
class Relationships
1516
{
17+
use Hookable;
18+
1619
public function __construct(protected Model $model, protected array $values = []) {}
1720

1821
public static function for(Model $model): self
@@ -34,10 +37,12 @@ public function save(): void
3437
->filter(fn (Field $field) => $field->fieldtype() instanceof HasManyFieldtype)
3538
->each(function (Field $field): void {
3639
$relationshipName = $this->model->runwayResource()->eloquentRelationships()->get($field->handle());
40+
$values = $this->values[$relationshipName] ?? [];
3741

3842
match (get_class($relationship = $this->model->{$relationshipName}())) {
39-
HasMany::class => $this->saveHasManyRelationship($field, $relationship, $this->values[$field->handle()] ?? []),
40-
BelongsToMany::class => $this->saveBelongsToManyRelationship($field, $relationship, $this->values[$field->handle()] ?? []),
43+
HasMany::class => $this->saveHasManyRelationship($field, $relationship, $values),
44+
BelongsToMany::class => $this->saveBelongsToManyRelationship($field, $relationship, $values),
45+
default => $this->runHooks('saveCustomRelationship', compact('field', 'relationship', 'values')),
4146
};
4247
});
4348
}

src/Routing/RoutingModel.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ public function __construct(protected Model $model)
2121
$this->supplements = collect();
2222
}
2323

24+
public function model(): Model
25+
{
26+
return $this->model;
27+
}
28+
2429
public function route(): ?string
2530
{
2631
if (! $this->model->runwayUri) {

0 commit comments

Comments
 (0)