Skip to content

Commit aca840b

Browse files
committed
Adjust models for permalink
1 parent c032f90 commit aca840b

File tree

6 files changed

+8
-2
lines changed

6 files changed

+8
-2
lines changed

packages/category/src/Models/Category.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ class Category extends BaseDraftModel implements HasMedia
5656
'title',
5757
'status',
5858
'slug',
59+
'permalink',
5960
'content',
6061
'author_id',
6162
'author_type',

packages/category/src/Models/CategoryTranslation.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class CategoryTranslation extends BaseDraftTranslationModel
1515
'title',
1616
'locale',
1717
'slug',
18+
'permalink',
1819
'content',
1920
'to_publish_at',
2021
'published_at',

packages/draft/src/Models/Draft.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ class Draft extends BaseDraftModel implements HasMedia
6363
public $translatedAttributes = [
6464
'title',
6565
'slug',
66+
'permalink',
6667
'description',
6768
'content',
6869
'author_id',
@@ -157,13 +158,13 @@ public function handleSchedulingDates(): void
157158
/** @var DraftTranslation|null $translation */
158159
$translation = $this->translate($locale);
159160

160-
if (! $translation) {
161+
if (!$translation) {
161162
return;
162163
}
163164

164165
switch ($translation->status) {
165166
case 'scheduled':
166-
if (! $translation->to_publish_at) {
167+
if (!$translation->to_publish_at) {
167168
$translation->to_publish_at = now();
168169
}
169170
$translation->published_at = null;

packages/draft/src/Models/DraftTranslation.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class DraftTranslation extends BaseDraftTranslationModel
1717
'draft_id',
1818
'title',
1919
'slug',
20+
'permalink',
2021
'status',
2122
'description',
2223
'content',

packages/tag/src/Models/Tag.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class Tag extends Model implements HasMedia, TranslatableContract
2828
public $translatedAttributes = [
2929
'title',
3030
'slug',
31+
'permalink',
3132
'content',
3233
'author_id',
3334
'author_type',

packages/tag/src/Models/TagTranslation.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class TagTranslation extends BaseDraftTranslationModel
1616
'tag_id',
1717
'title',
1818
'slug',
19+
'permalink',
1920
'content',
2021
'author_id',
2122
'author_type',

0 commit comments

Comments
 (0)