Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Wallet Laravel Package

zotel/laravel-wallet

View on GitHub
Deep Wiki
Context7

Race Condition

A common issue in the issue is about race conditions.

If you have not yet imported the config into the project, then you need to do this.

php artisan vendor:publish --tag=laravel-wallet-config

Previously, there was a vacuum package, but now it is a part of the core. You just need to configure the lock service and the cache service in the package configuration wallet.php.

    /**
     * A system for dealing with race conditions.
     */
    'lock' => [
        'driver' => 'array',
        'seconds' => 1,
    ],

To enable the fight against race conditions, you need to select a provider that supports work with locks. I recommend redis.

There is a setting for storing the state of the wallet, I recommend choosing redis here too.

    /**
     * Storage of the state of the balance of wallets.
     */
    'cache' => ['driver' => 'array'],

You need redis-server and php-redis.

Redis is recommended but not required. You can choose whatever the framework offers you.

It's simple!

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route