Skip to content

Commit f1c987c

Browse files
committed
Revisit the full slug saving flow
1 parent 7bd0023 commit f1c987c

File tree

17 files changed

+110
-36
lines changed

17 files changed

+110
-36
lines changed

docs/content/2_guides/1_page-builder-with-blade/5_configuring-the-page-module.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ class Page extends Model
168168
'description',
169169
];
170170
171-
public $slugAttributes = [
171+
protected $slugFields = [
172172
'title',
173173
];
174174

docs/content/2_guides/building_a_multilingual_site_with_twill_and_laravel_localization/Article.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Article extends Model implements LocalizedUrlRoutable
2424
'description',
2525
];
2626

27-
public $slugAttributes = [
27+
protected $slugFields = [
2828
'title',
2929
];
3030

docs/content/2_guides/prefill-block-editor-from-template/Article.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class Article extends Model implements Sortable
5757

5858
// #endregion fillable
5959

60-
public $slugAttributes = [
60+
private $slugFields = [
6161
'title',
6262
];
6363

examples/basic-page-builder/app/Models/Page.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Page extends Model
2424
'description',
2525
];
2626

27-
public $slugAttributes = [
27+
protected $slugFields = [
2828
'title',
2929
];
3030
}

examples/portfolio/app/Models/Partner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Partner extends Model
2424
'description',
2525
];
2626

27-
public $slugAttributes = [
27+
protected $slugFields = [
2828
'title',
2929
];
3030

examples/portfolio/app/Models/Project.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class Project extends Model
2727
'description',
2828
];
2929

30-
public $slugAttributes = [
30+
protected $slugFields = [
3131
'title',
3232
];
3333

examples/tests-capsules/app/Twill/Capsules/Posts/Models/Post.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Post extends Model implements Sortable
2626

2727
public $translatedAttributes = ['title', 'description'];
2828

29-
public $slugAttributes = ['title'];
29+
public $slugFields = ['title'];
3030

3131
public $mediasParams = [
3232
'cover' => [

examples/tests-modules/app/Models/Author.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class Author extends Model implements Sortable
5656
public $translatedAttributes = ['name', 'description', 'bio'];
5757

5858
// uncomment and modify this as needed if you use the HasSlug trait
59-
public $slugAttributes = ['name'];
59+
protected $slugFields = ['name'];
6060

6161
// add checkbox fields names here (published toggle is itself a checkbox)
6262
public $checkboxes = ['published'];

examples/tests-modules/app/Models/Category.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class Category extends Model
2525
public $translatedAttributes = ['title'];
2626

2727
// uncomment and modify this as needed if you use the HasSlug trait
28-
public $slugAttributes = ['title'];
28+
protected $slugFields = ['title'];
2929

3030
// add checkbox fields names here (published toggle is itself a checkbox)
3131
public $checkboxes = ['published'];

examples/tests-singleton/app/Models/ContactPage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class ContactPage extends Model
2525
'description',
2626
];
2727

28-
public $slugAttributes = [
28+
protected $slugFields = [
2929
'title',
3030
];
3131

0 commit comments

Comments
 (0)