Skip to content
Discussion options

You must be logged in to vote

The part to change is where the UUID is generated. In the documentation example, it is created in the service provider's boot() method and captured by the callback. Under Octane, that can reuse the same UUID across multiple requests handled by the worker.

Use a scoped container binding and resolve it inside the callback:

namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Str;
use Spatie\Activitylog\Contracts\Activity as ActivityContract;
use Spatie\Activitylog\Facades\Activity;

class AppServiceProvider extends ServiceProvider
{
    public function register(): void
    {
        $this->app->scoped(
            'activity.request_batch_uuid',
            …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Abdulmajeed-Jamaan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants