Showing with 6,048 additions and 13,636 deletions.
  1. +2 −2 .github/workflows/main.yml
  2. +83 −4 CHANGELOG.md
  3. +3 −3 composer.json
  4. +1 −1 config/dashboard.php
  5. +11 −0 config/oauth.php
  6. +2 −0 config/twill.php
  7. +1 −1 docs/content/1_docs/11_dashboard/index.md
  8. +4 −4 docs/content/1_docs/13_custom-cms-pages/1_index.md
  9. +20 −7 docs/content/1_docs/16_artisan-commands/index.md
  10. +29 −17 docs/content/1_docs/3_modules/12_nested-modules.md
  11. +3 −3 docs/content/1_docs/3_modules/6_table-builder.md
  12. +14 −1 docs/content/1_docs/4_form-fields/01_input.md
  13. +41 −17 docs/content/1_docs/4_form-fields/02_wysiwyg.md
  14. +1 −1 docs/content/1_docs/4_form-fields/06_multi-select.md
  15. +45 −1 docs/content/1_docs/4_form-fields/10_browser.md
  16. +9 −14 docs/content/1_docs/4_form-fields/11_repeater.md
  17. +1 −1 docs/content/1_docs/4_form-fields/16_field-grouping.md
  18. +15 −0 docs/content/1_docs/5_block-editor/02_creating-a-block-editor.md
  19. +3 −3 docs/content/1_docs/7_media-library/05_custom-metadata.md
  20. +6 −6 docs/content/2_guides/1_page-builder-with-blade/4_creating-the-page-module.md
  21. +2 −3 docs/content/2_guides/1_page-builder-with-blade/5_configuring-the-page-module.md
  22. +1 −1 docs/content/2_guides/1_page-builder-with-blade/8_building-a-front-end.md
  23. +5 −6 docs/content/2_guides/1_page-builder-with-blade/9_adding-navigation.md
  24. +0 −1 docs/content/2_guides/building_a_multilingual_site_with_twill_and_laravel_localization/Article.php
  25. +2 −2 docs/content/2_guides/json_repeaters/migration.php
  26. +2 −2 ...nt/2_guides/manage_frontend_user_profiles_from_twill/2021_08_01_204153_create_profiles_tables.php
  27. +2 −2 .../content/2_guides/prefill-block-editor-from-template/2021_09_19_131244_create_articles_tables.php
  28. +0 −1 examples/basic-page-builder/app/Models/Page.php
  29. +0 −1 examples/portfolio/app/Models/Partner.php
  30. +0 −1 examples/portfolio/app/Models/Project.php
  31. +2 −2 examples/portfolio/database/migrations/2022_04_01_071515_create_projects_tables.php
  32. +2 −2 examples/portfolio/database/migrations/2022_04_01_071748_create_partners_tables.php
  33. +2 −2 examples/portfolio/database/migrations/2022_04_06_070334_create_comments_tables.php
  34. +2 −2 examples/portfolio/database/migrations/2022_05_30_074255_create_links_tables.php
  35. +2 −2 examples/tests-browsers/database/migrations/2021_08_10_0001_create_writers_tables_for_browsers.php
  36. +2 −2 examples/tests-browsers/database/migrations/2021_08_10_0002_create_letters_tables_for_browsers.php
  37. +2 −2 ...es/tests-browsers/database/migrations/2021_08_10_0003_create_letter_writer_table_for_browsers.php
  38. +2 −2 examples/tests-browsers/database/migrations/2021_08_10_0004_create_bios_tables_for_browsers.php
  39. +2 −2 examples/tests-browsers/database/migrations/2021_08_10_0005_create_books_tables_for_browsers.php
  40. +3 −4 examples/tests-capsules/app/Twill/Capsules/Homepages/Models/Homepage.php
  41. +3 −3 ...es/app/Twill/Capsules/Homepages/database/migrations/2023_01_02_082723_create_homepages_tables.php
  42. +1 −1 examples/tests-capsules/app/Twill/Capsules/Posts/Models/Post.php
  43. +2 −2 ...s-capsules/app/Twill/Capsules/Posts/database/migrations/2020_08_14_205624_create_posts_tables.php
  44. +5 −11 examples/tests-deep-nested/database/migrations/2022_11_25_113826_create_clients_tables.php
  45. +2 −2 examples/tests-deep-nested/database/migrations/2022_11_25_114216_create_client_projects_tables.php
  46. +2 −9 ...s-deep-nested/database/migrations/2022_11_25_114233_create_client_project_applications_tables.php
  47. +1 −1 examples/tests-modules/app/Models/Author.php
  48. +1 −1 examples/tests-modules/app/Models/Category.php
  49. +2 −2 examples/tests-modules/database/migrations/2021_10_17_174613_create_categories_tables.php
  50. +2 −2 examples/tests-modules/database/migrations/2021_10_18_193753_create_authors_tables.php
  51. +4 −4 ...s/tests-modules/database/migrations/2022_05_25_083741_create_revision_limited_contents_tables.php
  52. +2 −2 examples/tests-nestedmodules/database/migrations/2021_09_16_230238_create_nodes_tables.php
  53. +2 −2 examples/tests-permissions/database/migrations/2021_07_20_132405_create_postings_tables.php
  54. +0 −1 examples/tests-singleton/app/Models/ContactPage.php
  55. +2 −2 examples/tests-singleton/database/migrations/2021_09_30_202102_create_contact_pages_tables.php
  56. +3 −4 examples/tests-subdomain-routing/app/Models/Page.php
  57. +4 −4 examples/tests-subdomain-routing/database/migrations/2022_08_17_112843_create_pages_tables.php
  58. +5 −0 frontend/icons-wysiwyg/wysiwyg_align_center.svg
  59. +5 −0 frontend/icons-wysiwyg/wysiwyg_align_justify.svg
  60. +5 −0 frontend/icons-wysiwyg/wysiwyg_align_left.svg
  61. +5 −0 frontend/icons-wysiwyg/wysiwyg_align_right.svg
  62. +4 −0 frontend/js/components/ConnectorField.vue
  63. +15 −1 frontend/js/components/Cropper.vue
  64. +6 −4 frontend/js/components/DatePicker.vue
  65. +1 −1 frontend/js/components/Filter.vue
  66. +5 −3 frontend/js/components/Previewer.vue
  67. +15 −3 frontend/js/components/VSelect.vue
  68. +3 −2 frontend/js/components/WysiwygMenuBarButton.vue
  69. +72 −15 frontend/js/components/WysiwygTiptap.vue
  70. +2 −2 frontend/js/components/blocks/BlockEditorItem.vue
  71. +0 −1 frontend/js/components/blocks/Blocks.vue
  72. +7 −1 frontend/js/components/dashboard/shortcutCreator.vue
  73. +53 −0 frontend/js/custom-components.js
  74. +3 −0 frontend/js/main-buckets.js
  75. +3 −0 frontend/js/main-dashboard.js
  76. +3 −0 frontend/js/main-form.js
  77. +3 −0 frontend/js/main-free.js
  78. +3 −0 frontend/js/main-listing.js
  79. +0 −48 frontend/js/main.js
  80. +4 −0 frontend/js/mixins/input.js
  81. +3 −0 frontend/js/mixins/locale.js
  82. +1 −1 frontend/scss/molecules/_block.scss
  83. +12 −7 frontend/scss/vendor/_vselect.scss
  84. +23 −0 lang/de/lang.php
  85. +9 −9 lang/en/lang.php
  86. +7 −7 lang/fr/lang.php
  87. +9 −7 lang/it/lang.php
  88. +320 −330 lang/lang.csv
  89. +305 −1 lang/nl/lang.php
  90. +468 −0 lang/sl/lang.php
  91. +2 −2 migrations/default/2020_02_09_000001_create_twill_default_users_tables.php
  92. +2 −2 migrations/default/2020_02_09_000002_create_twill_default_blocks_table.php
  93. +2 −2 migrations/default/2020_02_09_000003_create_twill_default_medias_tables.php
  94. +2 −2 migrations/default/2020_02_09_000004_create_twill_default_files_tables.php
  95. +2 −2 migrations/default/2020_02_09_000005_create_twill_default_settings_table.php
  96. +2 −2 migrations/default/2020_02_09_000006_create_twill_default_tags_tables.php
  97. +2 −2 migrations/default/2020_02_09_000007_create_twill_default_activity_log_table.php
  98. +2 −2 migrations/default/2020_02_09_000008_create_twill_default_features_table.php
  99. +2 −2 migrations/default/2020_02_09_000010_create_twill_default_related_table.php
  100. +2 −2 migrations/default/2020_02_09_000011_add_locale_column_to_twill_default-mediables.php
  101. +2 −2 migrations/default/2020_02_09_000012_change_locale_column_in_twill_default_fileables.php
  102. +2 −2 migrations/default/2020_02_09_000013_add_language_column_to_twill_default_users.php
  103. +2 −2 migrations/default/2020_02_09_000014_add_editor_name_column_to_blocks_table.php
  104. +2 −2 migrations/default/2021_07_08_000001_update_twill_default_users_table.php
  105. +2 −2 migrations/default/2022_01_25_000015_add_columns_to_activity_log_table.php
  106. +2 −2 migrations/default/2022_04_05_000015_update_activity_log_morph_size.php
  107. +1 −1 migrations/default/2022_08_29_110837_create_app_settings_tables.php
  108. +1 −1 migrations/default/2023_03_24_125122_add_id_to_related.php
  109. +22 −15 migrations/optional/permissions-management/2020_04_20_000001_support_permission.php
  110. +2 −2 ...ptional/permissions-management/2020_06_17_000002_add_subdomains_access_column_to_groups_table.php
  111. +2 −2 migrations/optional/permissions-management/2021_07_08_000002_update_twill_users_role_fields.php
  112. +2 −2 ...tions/optional/users-2fa/2020_02_09_000013_add_two_factor_auth_columns_to_twill_default_users.php
  113. +2 −2 migrations/optional/users-oauth/2020_02_09_000014_create_twill_default_users_oauth_table.php
  114. +3,526 −12,634 package-lock.json
  115. +40 −38 package.json
  116. +4 −0 src/Commands/Build.php
  117. +2 −2 src/Commands/ListIcons.php
  118. +2 −0 src/Commands/MakeCapsule.php
  119. +1 −0 src/Commands/MakeSingleton.php
  120. +61 −30 src/Commands/ModuleMake.php
  121. +2 −2 src/Commands/stubs/migration.stub
  122. +0 −1 src/Commands/stubs/model.stub
  123. +3 −0 src/DuskServiceProvider.php
  124. +8 −4 src/Helpers/helpers.php
  125. +1 −1 src/Helpers/migrations_helpers.php
  126. +1 −1 src/Helpers/routes_helpers.php
  127. +1 −1 src/Http/Controllers/Admin/AppSettingsController.php
  128. +48 −17 src/Http/Controllers/Admin/DashboardController.php
  129. +1 −1 src/Http/Controllers/Admin/FeaturedController.php
  130. +3 −3 src/Http/Controllers/Admin/FileLibraryController.php
  131. +1 −1 src/Http/Controllers/Admin/IconsController.php
  132. +11 −5 src/Http/Controllers/Admin/LoginController.php
  133. +46 −4 src/Http/Controllers/Admin/ModuleController.php
  134. +2 −2 src/Http/Controllers/Admin/ResetPasswordController.php
  135. +3 −1 src/Http/Controllers/Admin/RoleController.php
  136. +1 −1 src/Http/Controllers/Admin/SettingController.php
  137. +10 −4 src/Http/Controllers/Admin/UserController.php
  138. +3 −3 src/Http/Middleware/Authenticate.php
  139. +7 −3 src/Http/Requests/Admin/OauthRequest.php
  140. +4 −4 src/Http/ViewComposers/FilesUploaderConfig.php
  141. +4 −4 src/Http/ViewComposers/MediasUploaderConfig.php
  142. +13 −0 src/Models/AppSetting.php
  143. +12 −14 src/Models/Behaviors/HasMedias.php
  144. +1 −1 src/Models/Behaviors/HasNesting.php
  145. +2 −2 src/Models/Behaviors/IsTranslatable.php
  146. +1 −1 src/Models/Block.php
  147. +3 −3 src/Models/Media.php
  148. +3 −1 src/Models/Model.php
  149. +6 −0 src/Models/Permission.php
  150. +6 −0 src/Models/Role.php
  151. +0 −1 src/Models/Setting.php
  152. +1 −1 src/Notifications/PasswordResetByAdmin.php
  153. +1 −1 src/Notifications/Reset.php
  154. +1 −1 src/Notifications/TemporaryPassword.php
  155. +1 −1 src/Notifications/Welcome.php
  156. +8 −6 src/Repositories/Behaviors/HandleBlocks.php
  157. +1 −1 src/Repositories/Behaviors/HandleBrowsers.php
  158. +1 −1 src/Repositories/Behaviors/HandleFieldsGroups.php
  159. +1 −0 src/Repositories/Behaviors/HandleMedias.php
  160. +4 −4 src/Repositories/Behaviors/HandleTranslations.php
  161. +14 −2 src/Repositories/Behaviors/HandleUserPermissions.php
  162. +1 −1 src/Repositories/ModuleRepository.php
  163. +7 −4 src/Services/Breadcrumbs/NestedBreadcrumbs.php
  164. +20 −0 src/Services/Forms/Fields/BaseFormField.php
  165. +12 −0 src/Services/Forms/Fields/BlockEditor.php
  166. +11 −0 src/Services/Forms/Fields/DatePicker.php
  167. +4 −0 src/Services/Forms/Fields/Input.php
  168. +18 −0 src/Services/Forms/Fields/Traits/HasDirection.php
  169. +18 −0 src/Services/Forms/Fields/Traits/HasReadOnly.php
  170. +15 −0 src/Services/Forms/Fields/Wysiwyg.php
  171. +12 −0 src/Services/Forms/InlineRepeater.php
  172. +60 −0 src/Services/Listings/Columns/Link.php
  173. +0 −7 src/Services/Listings/Columns/NestedData.php
  174. +2 −2 src/Services/Listings/TableColumns.php
  175. +6 −7 src/Services/Settings/SettingsGroup.php
  176. +1 −1 src/TwillAppSettings.php
  177. +8 −1 src/TwillCapsules.php
  178. +15 −0 src/TwillNavigation.php
  179. +7 −16 src/TwillServiceProvider.php
  180. +11 −1 src/TwillUtil.php
  181. +3 −1 src/View/Components/Fields/BlockEditor.php
  182. +1 −0 src/View/Components/Fields/Input.php
  183. +2 −0 src/View/Components/Fields/Wysiwyg.php
  184. +3 −3 src/View/Components/Navigation/NavigationLink.php
  185. +5 −4 tests/integration/Capsules/CapsulesTest.php
  186. +2 −0 tests/integration/Commands/MakeModuleTest.php
  187. +1 −0 tests/integration/Commands/MakeSingletonTest.php
  188. +3 −3 tests/integration/Controllers/Tables/NestedDataColumnTest.php
  189. +4 −0 tests/integration/Settings/SettingsFacadeTest.php
  190. +1 −0 twill-assets/assets/twill/css/chunk-common.e728353d.css
  191. +0 −1 twill-assets/assets/twill/css/chunk-common.e841ac84.css
  192. +3 −3 twill-assets/assets/twill/css/{chunk-vendors.b94decf1.css → chunk-vendors.42fc7b31.css}
  193. +1 −0 twill-assets/assets/twill/css/main-dashboard.08050331.css
  194. +0 −1 twill-assets/assets/twill/css/main-dashboard.de1742c4.css
  195. +1 −1 twill-assets/assets/twill/css/{main-form.a207b6fd.css → main-form.f761e614.css}
  196. +0 −1 twill-assets/assets/twill/js/chunk-common.1ed60259.js
  197. +1 −0 twill-assets/assets/twill/js/chunk-common.b84db4b0.js
  198. +0 −37 twill-assets/assets/twill/js/chunk-vendors.32c1416e.js
  199. +37 −0 twill-assets/assets/twill/js/chunk-vendors.669dd922.js
  200. +1 −0 twill-assets/assets/twill/js/main-buckets.61bec894.js
  201. +0 −1 twill-assets/assets/twill/js/main-buckets.ca9c5f12.js
  202. +1 −0 twill-assets/assets/twill/js/main-dashboard.59f736b4.js
  203. +0 −1 twill-assets/assets/twill/js/main-dashboard.a2275644.js
  204. +1 −0 twill-assets/assets/twill/js/main-form.76739884.js
  205. +0 −1 twill-assets/assets/twill/js/main-form.c674631b.js
  206. +0 −1 twill-assets/assets/twill/js/main-free.72470c76.js
  207. +1 −0 twill-assets/assets/twill/js/main-free.a9a7a1eb.js
  208. +0 −1 twill-assets/assets/twill/js/main-listing.4ea5ba02.js
  209. +1 −0 twill-assets/assets/twill/js/main-listing.7f6ee5a1.js
  210. +11 −11 twill-assets/assets/twill/twill-manifest.json
  211. +1 −1 views/auth/2fa.blade.php
  212. +3 −3 views/auth/login.blade.php
  213. +3 −3 views/auth/oauth-link.blade.php
  214. +1 −1 views/auth/passwords/email.blade.php
  215. +1 −1 views/auth/passwords/reset.blade.php
  216. +1 −1 views/layouts/form.blade.php
  217. +5 −5 views/layouts/main.blade.php
  218. +2 −1 views/partials/create.blade.php
  219. +2 −2 views/partials/form/_block_editor.blade.php
  220. +2 −0 views/partials/form/_input.blade.php
  221. +8 −2 views/partials/form/_wysiwyg.blade.php
  222. +1 −1 views/partials/form/utils/_connected_fields.blade.php
  223. +1 −1 views/partials/icons/icons-wysiwyg-svg.blade.php
  224. +2 −2 views/partials/navigation/_overlay_navigation.blade.php
  225. +8 −3 views/partials/navigation/_tertiary_navigation.blade.php
  226. +1 −1 views/partials/navigation/_title.blade.php
  227. +6 −6 views/partials/navigation/_user.blade.php
  228. +1 −1 views/roles/form.blade.php
  229. +1 −1 views/users/form.blade.php
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
php-version: 8.3
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
coverage: none

Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
php: [8.2, 8.1, 8.0]
php: [8.3, 8.2, 8.1, 8.0]
laravel: [9.*, 10.*]
exclude:
- laravel: 10.*
Expand Down
87 changes: 83 additions & 4 deletions CHANGELOG.md
Expand Up @@ -2,9 +2,88 @@

All notable changes to `twill` will be documented in this file.

## UNRELEASED (3.1.0)

### Added
- Add connected fields support to the Twill 3 form builder by @joyceverheije in #2323
- Support block component classes in the block editor `blocks` array by @joyceverheije in 8778ab7e
- Add `max` option to form builder `InlineRepeater` field by @joyceverheije in 4a773869
- Make preview breakpoints configurable by @florrie-90 in #2299
- Add `Link` column type to table builder by @agnonym in #2376
- PHP 8.3 support by @antonioribeiro in #2374
- Add `routePrefix` support to nested breadcrumbs by @yamaha252 in #2312
- Add direction option to form input, textarea and WYSIWYG fields by @13twelve in #2295
- Add read-only support to the form builder's Input field by @zachgarwood in #2331
- Make permissions and roles table names configurable by @Keania-Eric in #2350
- Support multiple nested table columns by @yamaha252 and @joyceverheije in #2314 and 1edbfbb1
- Add support for current request only tertiary nav links by @joyceverheije
- Add support for titleInBrowser and adminEditUrl accessors in browsers by @joyceverheije
- Add configuration to controls whether a user should be created or not when a new user is logging in through Oauth by @joyceverheije
- Allow QuickFilter extension by @joyceverheije
- Automatically add `active` to `$translatedAttributes` by @driftingly in #2401
- Add `--factory` and `--seeder` to `twill:make:module` by @driftingly in #2402
- Update migration stub and existing migrations to use anonymous class by @driftingly in #2406
- Add predefined class selection to TipTap link component by @zipavlin in #2336
- Allow customization of the title column's label by @Phiosss in #2318
- Add alignment buttons to TipTap editor by @florrie-90 in #2305
- Fixes breaking changes in Laravel Analytics and support GA4 by @lewiswharf in #2288
- Allow a list of blocks to be excluded from the block editor fields by @pauldwight in #2409

### Fixed
- Fix custom components registration by @joyceverheije in 7c233334
- Turn move dropdowns off for settings blocks by @droplister in #2293
- Fix scheduled filter label by @droplister in #2291
- Fix related table name in migration down method by @droplister in #2290
- Updated namespace paths from Admin to Twill on custom pages by @pauldwight in #2317
- Fix type of $forceLocale in translatedInput() by @pvdbroek in #2315
- Fix duplication when translated media fields are enabled by @petertsoisstuff in #2320
- Support using a dot as `fieldsGroupsFormFieldNameSeparator` by @yamaha252 in #2277
- Allow dashboard modules to wrap onto the next line by @florrie-90 in #2298
- Always include locale in the mediables pivot by @bonroyage in #2368
- Fixes to reduce excessive number of queries when using Twill 3 settings by @bonroyage in #2369
- Update migration helper for translations table by @sauron in #2327
- Fix x-position of full height crops being reset at some ratios/screen sizes by @13twelve in #2297
- Fix optional feature migrations publication by @Tofandel in #2384
- Fix build error with custom icons by @emanueljacob in #2392
- Fix position value for blocks in non-default editors by @joyceverheije in #2381
- Fix user list errors when deleting roles by @antonioribeiro in #2372
- Fix keepAlive on connected non localized fields by @joyceverheije
- Fix active navigation check when a child module uses the same name as another module by @joyceverheije
- Avoid unused data and hooks when using the default role level by @joyceverheije
- Check user permission when displaying activity log items by @joyceverheije
- Remove block actions in settings blocks by @ifox
- Fix datepicker selection by @ifox
- Fix create button alignement in listings by @ifox
- Fixes incorrect order of nested items slug when item is more than 2 levels deep by @pauldwight in #2388
- Fix getCapsuleForModel() for when passing a Model object by @antonioribeiro in #2400
- Preserve default vselect value when undefined by @bwat-dev in #2311
- Don't load DuskServiceProvider if dusk doesn't exist by @Tofandel in #2366
- Use custom model configuration in the relationship morph map by @redelschaap in #2408
- Fix `parseInternalLinks` helper issues by @avinash403 in #2338
- Use pushOnce builtin, remove custom pushonce directive by @mikerockett in #2301
- Prevent multi select options from being selected more than once by @florrie-90 in #2296
- Use twill.admin_route_name_prefix configuration for all internal routes by @ifox and @raymondtri in #2286

### Docs
- Add instructions on how to use the browser field with a custom pivot table by @poncianodiego and @ifox in https://github.com/area17/twill/pull/2385
- Fix wrong property name in 12_nested-modules.md by @Viliasas in #2282
- Fix artisan command by @thecrazybob in #2365
- Fix typo in create page module guide by @colegeissinger in #2367
- Content - Modules - TableBuilder: typo by @agnonym in #2375
- Updates to the docs for nested modules by @pauldwight in #2389
- Fix typo in 8_building-a-front-end.md by @driftingly in #2396
- Changed example value to better reflect given example on 16_field-groups.md by @Viliasas in #2283

### Translations
- Added Slovenian language to translations by @Neoglyph in #2373
- Update dutch lang files by @lindeVW in #2378

### Chores
- Update frontend dependencies by @ifox

## 3.0.2

## Fixed
### Fixed

- Rendering of nested components blocks by @haringsrob in https://github.com/area17/twill/pull/2243
- Rendering of side form if it only contains fieldsets by @agnonym in https://github.com/area17/twill/pull/2234
Expand All @@ -14,7 +93,7 @@ All notable changes to `twill` will be documented in this file.
- `Options::fromArray` argument order by @bonroyage in https://github.com/area17/twill/pull/2231
- Update package generator stub by @ifox in https://github.com/area17/twill/commit/78cc5b5dc023134356210f8c8940f77ff7745ea3

## Improved
### Improved

- Fix activity log typo by @DanielSpravtsev in https://github.com/area17/twill/pull/2264
- Fix two misspellings by @skoontastic in https://github.com/area17/twill/pull/2250
Expand All @@ -29,11 +108,11 @@ All notable changes to `twill` will be documented in this file.

## 3.0.1

## Fixed
### Fixed

- Fix Blade components resolution (causing an issue with Laravel Jetstream) by @haringsrob in https://github.com/area17/twill/pull/2223

## Improved
### Improved

- Add mobile nav to all docs site pages by @13twelve in https://github.com/area17/twill/pull/2224
- Fix WYSIWYG maxlength docs by @tttogo in https://github.com/area17/twill/pull/2226
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Expand Up @@ -41,15 +41,15 @@
"myclabs/php-enum": "^1.5",
"pragmarx/google2fa-qrcode": "^2.0",
"spatie/laravel-activitylog": "^4.0",
"spatie/laravel-analytics": "^4.0",
"spatie/laravel-analytics": "^4.0|^5.0",
"spatie/once": "^3.0"
},
"require-dev": {
"area17/phptorch": "dev-main",
"chillerlan/php-qrcode": "~4.0",
"friendsofphp/php-cs-fixer": "^3.0",
"nette/php-generator": "v4.0.3",
"nunomaduro/collision": "^6.0",
"nette/php-generator": "^4.0.3",
"nunomaduro/collision": "^6.0|^7.0|^8.0",
"nunomaduro/larastan": "^2.0",
"orchestra/testbench": "^7.8|^8.0",
"orchestra/testbench-dusk": "^7.8|^8.0",
Expand Down
2 changes: 1 addition & 1 deletion config/dashboard.php
Expand Up @@ -12,7 +12,7 @@
*/
'modules' => [],
'analytics' => ['enabled' => false],
'search_endpoint' => 'twill.search',
'search_endpoint' => config('twill.admin_route_name_prefix') . 'search',

/*
|--------------------------------------------------------------------------
Expand Down
11 changes: 11 additions & 0 deletions config/oauth.php
Expand Up @@ -15,6 +15,17 @@
*/
'providers' => ['google'],

/*
|--------------------------------------------------------------------------
| This boolean controls whether a user should be created or not
| when a new user is logging in through Oauth
|--------------------------------------------------------------------------
|
| Possible values: true, false
|
*/
'create_user_with_default_role' => true,

/*
|--------------------------------------------------------------------------
| New user default role name (legacy)
Expand Down
2 changes: 2 additions & 0 deletions config/twill.php
Expand Up @@ -143,6 +143,8 @@
'tags_table' => 'twill_tags',
'users_oauth_table' => 'twill_users_oauth',
'users_table' => 'twill_users',
'permissions_table' => 'permissions',
'roles_table' => 'roles',

/*
|--------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/content/1_docs/11_dashboard/index.md
Expand Up @@ -48,7 +48,7 @@ return [

It is using Spatie's [Laravel Analytics](https://github.com/spatie/laravel-analytics) package.

Follow [Spatie's documentation](https://github.com/spatie/laravel-analytics#how-to-obtain-the-credentials-to-communicate-with-google-analytics) to set up a Google service account and download a json file containing your credentials, and provide your Analytics view ID using the `ANALYTICS_VIEW_ID` environment variable.
Follow [Spatie's documentation](https://github.com/spatie/laravel-analytics#how-to-obtain-the-credentials-to-communicate-with-google-analytics) to set up a Google service account and download a json file containing your credentials, and provide your Analytics view ID using the `ANALYTICS_PROPERTY_ID` environment variable.

## User activity

Expand Down
8 changes: 4 additions & 4 deletions docs/content/1_docs/13_custom-cms-pages/1_index.md
Expand Up @@ -26,25 +26,25 @@ return [
- Add a controller to handle the request

```php
// file: app/Http/Controllers/Admin/CustomPageController.php
// file: app/Http/Controllers/Twill/CustomPageController.php

namespace App\Http\Controllers\Admin;
namespace App\Http\Controllers\Twill;

use A17\Twill\Http\Controllers\Admin\Controller;

class CustomPageController extends Controller
{
public function show()
{
return view('admin.customPage');
return view('twill.customPage');
}
}
```

- And create the view

```php
// file: resources/views/admin/customPage.blade.php
// file: resources/views/twill/customPage.blade.php

@extends('twill::layouts.free')

Expand Down
27 changes: 20 additions & 7 deletions docs/content/1_docs/16_artisan-commands/index.md
Expand Up @@ -25,7 +25,7 @@ php artisan twill:refresh-crops
{--dry : Print the operations that would be performed without modifying the database}` -
```

* `php artisan twill:make:module` - Generate a new module, see [CLI Generator](./../3_modules/2_cli-generator.md)
* `php artisan twill:make:module` - Generate a new module, see [CLI Generator](./../3_modules/2_cli-generator.md)

```
php artisan twill:make:module {moduleName}
Expand All @@ -39,10 +39,15 @@ php artisan twill:make:module {moduleName}
{--N|hasNesting}
{--bladeForm}
{--E|generatePreview}
{--parentModel=}
{--all}
{--force}
{--factory}
{--seeder}
{--packageDirectory=}
{--packageNamespace=}
{--parentModel=}
```


* `php artisan twill:make:singleton` - Generate a new singleton, see [CLI Generator](./../3_modules/2_cli-generator.md)
```
Expand All @@ -56,14 +61,16 @@ php artisan twill:make:singleton {moduleName}
{--E|generatePreview}
{--bladeForm}
{--all}
{--force}
{--factory}
{--packageDirectory=}
{--packageNamespace=}
{--parentModel=}
```

* `php artisan twill:make:capsule` - Generate a new capsule, see [CLI Generator](./../3_modules/2_cli-generator.md)
```
php artisan twill:make:capsule {moduleName}
{--singleton}
{--packageDirectory=}
{--packageNamespace=}
php artisan twill:make:capsule {moduleName}
{--B|hasBlocks}
{--T|hasTranslation}
{--S|hasSlug}
Expand All @@ -73,9 +80,15 @@ php artisan twill:make:capsule {moduleName}
{--R|hasRevisions}
{--N|hasNesting}
{--E|generatePreview}
{--singleton}
{--bladeForm}
{--all}
{--force}
{--factory}
{--seeder}
{--packageDirectory=}
{--packageNamespace=}
{--parentModel=}
```

* `php artisan twill:list:icons {filter? : Filter icons by name}` - List available icons
Expand Down
46 changes: 29 additions & 17 deletions docs/content/1_docs/3_modules/12_nested-modules.md
Expand Up @@ -39,11 +39,11 @@ $slug = $item->getNestedSlug($lang);
To include all ancestor slugs in the permalink of an item in the CMS, you can dynamically set the `$permalinkBase` property from the `form()` method of your module controller:

```php
class PageController extends ModuleController
class PageController extends NestedModuleController
{
//...

protected function form($id, $item = null)
protected function form(?int $id, TwillModelContract $item = null): array
{
$item = $this->repository->getById($id, $this->formWith, $this->formWithCount);

Expand All @@ -68,9 +68,24 @@ Route::get('{slug}', function ($slug) {
})->where('slug', '.*');
```

For more information on how to work with nested items in your application, you can refer to the
For more information on how to work with nested items in your application, you can refer to the
[laravel-nestedset package documentation](https://github.com/lazychaser/laravel-nestedset#retrieving-nodes).

### Setting a maximum nested depth

You can also define the maximum depth allowed for the module changing the following:
```php
protected $nestedItemsDepth = 1;
```
Note: a depth of 1 means parent and child.

### Working with browser fields

By default only a parent item will be visible to the browser field. If you want to show child items when browsing for the module you can set `$showOnlyParentItemsInBrowsers` to false:
```php
protected $showOnlyParentItemsInBrowsers = false; // default is true
```

## Parent-child modules

Parent-child modules are 2 distinct modules, where items of the child module are attached to items of the parent module (e.g. Issues can contain Articles):
Expand All @@ -85,23 +100,20 @@ We'll use the `slug` and `position` features in this example but you can customi

```
php artisan twill:make:module issues -SP
php artisan twill:make:module issueArticles -SP --parentModel=Issue
php artisan twill:make:module issueArticles -SP --parentModel=Issue
```

Add the `issue_id` foreign key to the child module's migration:

```php
class CreateIssueArticlesTables extends Migration
public function up()
{
public function up()
{
Schema::create('issue_articles', function (Blueprint $table) {
// ...
$table->foreignIdFor(Issue::class);
});

Schema::create('issue_articles', function (Blueprint $table) {
// ...
}
$table->foreignIdFor(Issue::class);
});

// ...
}
```

Expand All @@ -122,7 +134,7 @@ class IssueArticle extends Model implements Sortable
// ...
'issue_id',
];

public function issue()
{
return $this->belongsTo(Issue::class);
Expand Down Expand Up @@ -151,17 +163,17 @@ use A17\Twill\Services\Breadcrumbs\NestedBreadcrumbs;

class IssueArticleController extends BaseModuleController
{
protected $modelName = 'BrandProduct';
protected $moduleName = 'issues.articles';
protected $modelName = 'IssueArticle';

protected function setUpController(): void
{
$this->setModuleName('issues.articles');
if (request('issue')) {
$this->setBreadcrumbs(
NestedBreadcrumbs::make()
->forParent(
parentModule: 'issues',
module: $this->modelName,
module: $this->moduleName,
activeParentId: request('issue'),
repository: \App\Repositories\IssueRepository::class
)
Expand Down