mirror of
https://github.com/archtechx/tenancy-queue-tester.git
synced 2025-12-12 18:44:04 +00:00
28 lines
616 B
PHP
Executable file
28 lines
616 B
PHP
Executable file
<?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');
|
|
});
|
|
}
|
|
}
|