1
0
Fork 0
mirror of https://github.com/archtechx/tenancy-queue-tester.git synced 2025-12-12 09:44:03 +00:00

add persistence, sync, and forceRefresh assertions

This commit is contained in:
Samuel Štancl 2025-01-07 15:37:37 +01:00
parent fd830beaf7
commit 6a047d3686
10 changed files with 562 additions and 29 deletions

28
setup/AppServiceProvider.php Executable file
View file

@ -0,0 +1,28 @@
<?php
namespace App\Providers;
use Illuminate\Queue\Events\JobProcessed;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*/
public function register(): void
{
//
}
/**
* Bootstrap any application services.
*/
public function boot(): void
{
Event::listen(JobProcessed::class, function () {
file_put_contents(base_path('jobprocessed_context'), tenant() ? ('tenant_' . tenant('id')) : 'central');
});
}
}