1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 19:34:04 +00:00
tenancy/tests/Etc
Samuel Štancl 6523f24a60 Pending tenants: Add getPendingAttributes()
This method lets the user specify default values for custom
non-nullable columns. The primary use case is when the tenants table
has a column like 'slug' and createPending() is called with no
value for 'slug'. This would produce an exception due to the column
having no default value.

Here, getPendingAttributes() can set an initial dummy slug (like a
randomly generated string) before it's overwritten during a pull.

getPendingAttributes() accepts an $attributes array which corresponds
to the attributes passed to createPending(). The array returned from
getPendingAttributes() is ultimately merged with $attributes, so
the user doesn't need to use the $attributes value in
getPendingAttributes(), however it serves to provide more context when
the pending attributes might be dependent on $attributes and therefore
derived from the $attributes actually being used.

Also fixed the `finally` branch in createPending() as it was
potentially referencing the $tenant variable before it was initialized.
2025-10-28 12:50:13 +01:00
..
Console [4.x] Fix tenants:run argument parsing (#1287) 2025-01-11 12:03:09 +01:00
EarlyIdentification Central routes without Route::domain(), configurable tenant/central routes by default for domain/subdomain identification, allow accessing central routes in early identification for path & request data middleware (#3) 2023-08-03 00:23:26 +02:00
mail_migrations Allow mapping nested tenant properties to mail config (#20) 2023-12-18 12:42:03 +01:00
ResourceSyncing Resource syncing rework (#30) 2024-02-10 19:08:37 +01:00
session_migrations Add SessionTenancyBootstrapper (#2) 2022-11-20 02:32:25 +01:00
synced_resource_migrations Resource syncing rework (#30) 2024-02-10 19:08:37 +01:00
2019_08_08_000001_add_custom_column.php Apply fixes from StyleCI (#126) 2019-09-11 17:37:02 +02:00
2023_08_08_000001_add_domain_column.php Single-domain tenants (#16) 2023-11-08 11:38:26 +01:00
CacheService.php Cache prefix mode for separating tenant caches (#1014) 2023-04-24 16:25:51 +02:00
defaultHttpKernelv6.stub Laravel 7 support (#304) 2020-03-17 18:47:24 +01:00
defaultHttpKernelv7.stub Laravel 7 support (#304) 2020-03-17 18:47:24 +01:00
ExampleSeeder.php Completing PR #881 (#902) 2022-07-20 15:28:45 +02:00
HasMiddlewareController.php Give universal flag highest priority (#27) 2024-01-25 15:27:17 +01:00
HttpKernel.php Add SessionTenancyBootstrapper (#2) 2022-11-20 02:32:25 +01:00
modifiedHttpKernelv6.stub Laravel 7 support (#304) 2020-03-17 18:47:24 +01:00
modifiedHttpKernelv7.stub Laravel 7 support (#304) 2020-03-17 18:47:24 +01:00
SingleDomainTenant.php Make getCustomColumns() static in SingleDomainTenant 2023-11-09 09:35:06 +01:00
SpecificCacheStoreService.php Cache prefix mode for separating tenant caches (#1014) 2023-04-24 16:25:51 +02:00
tenant-schema.dump Laravel 11 support + Docker improvements (#29) 2024-02-18 00:18:31 +01:00
Tenant.php Pending tenants: Add getPendingAttributes() 2025-10-28 12:50:13 +01:00
TestingBroadcaster.php Add broadcasting channel prefixing bootstrapper (#12) 2023-11-06 22:09:01 +01:00
TestSeeder.php [4.x] Migrate tests to Pest (#884) 2022-07-22 19:26:59 +02:00
User.php [3.x] DB users (#382) 2020-05-03 18:12:27 +02:00