Weave Code
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

Money Bundle Laravel Package

babdev/money-bundle

View on GitHub
Deep Wiki
Context7

Doctrine

MongoDB ODM

When used with an application where the Doctrine MongoDB ODM (and DoctrineMongoDBBundle) is installed, the MoneyBundle defines an appropriate schema allowing Money\Money objects to be embedded within documents with no extra effort.

All that is required is to define a field on your document as an embedded field with the Money\Money type, such as the below example document:

<?php

namespace App\Document;

use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
use Money\Money;

#[ODM\Document]
class Invoice
{
    #[ODM\EmbedOne(targetDocument: Money::class)]
    public Money $tax_due;

    public function __construct()
    {
        $this->tax_due = Money::USD(0);
    }
}

ORM

When used with an application where the Doctrine ORM (and DoctrineBundle) is installed, the MoneyBundle defines an appropriate database schema allowing Money\Money objects to be used within entities with no extra effort.

All that is required is to define a field on your entity as an embedded field with the Money\Money type, such as the below example entity:

<?php

namespace App\Entity;

use Doctrine\ORM\Mapping as ORM;
use Money\Money;

#[ORM\Entity]
class Invoice
{
    #[ORM\Embedded(class: Money::class)]
    public Money $tax_due;

    public function __construct()
    {
        $this->tax_due = Money::USD(0);
    }
}
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.
emuniq/filament-browser-notifications
syriable/filament-translator
hungnm28/livewire-form
wenprise/eloquent
crudly/encrypted
fadion/bouncy
cuci/prototurk-sdk
gos/pubsub-router-bundle
cuci/prototurk-sdk-symfony
clementtalleu/easyadmin-markdown-bundle
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui