{"id":15641228,"url":"https://github.com/vyuldashev/nova-money-field","last_synced_at":"2025-04-05T11:09:16.245Z","repository":{"id":32913516,"uuid":"145981108","full_name":"vyuldashev/nova-money-field","owner":"vyuldashev","description":"Money Field for Laravel Nova","archived":false,"fork":false,"pushed_at":"2024-03-22T14:33:38.000Z","size":1165,"stargazers_count":74,"open_issues_count":21,"forks_count":37,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-03T20:13:41.505Z","etag":null,"topics":["currency","laravel","money","nova","php"],"latest_commit_sha":null,"homepage":"https://novapackages.com/packages/vyuldashev/nova-money-field","language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vyuldashev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-24T11:03:24.000Z","updated_at":"2024-10-22T07:32:10.000Z","dependencies_parsed_at":"2024-06-18T15:28:59.978Z","dependency_job_id":"e0ffabb7-7735-429d-a913-adbbcb4a29a5","html_url":"https://github.com/vyuldashev/nova-money-field","commit_stats":{"total_commits":43,"total_committers":8,"mean_commits":5.375,"dds":0.6744186046511628,"last_synced_commit":"60164d6063c9fa32ff7fca5fe11fe03a352560a1"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vyuldashev%2Fnova-money-field","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vyuldashev%2Fnova-money-field/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vyuldashev%2Fnova-money-field/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vyuldashev%2Fnova-money-field/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vyuldashev","download_url":"https://codeload.github.com/vyuldashev/nova-money-field/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247325693,"owners_count":20920714,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["currency","laravel","money","nova","php"],"created_at":"2024-10-03T11:41:54.381Z","updated_at":"2025-04-05T11:09:16.229Z","avatar_url":"https://github.com/vyuldashev.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Money Field for Laravel Nova\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/vyuldashev/nova-money-field.svg?style=flat-square)](https://packagist.org/packages/vyuldashev/nova-money-field)\n[![Total Downloads](https://img.shields.io/packagist/dt/vyuldashev/nova-money-field.svg?style=flat-square)](https://packagist.org/packages/vyuldashev/nova-money-field)\n\n![screenshot 1](https://raw.githubusercontent.com/vyuldashev/nova-money-field/master/docs/user-details.png)\n\n## Installation\n\nYou can install the package in to a Laravel app that uses [Nova](https://nova.laravel.com) via composer:\n\n```bash\ncomposer require vyuldashev/nova-money-field\n```\n\n## Usage\n\nIn resource:\n\n```php\n// ...\nuse Vyuldashev\\NovaMoneyField\\Money;\n\npublic function fields(Request $request)\n{\n    return [\n        // ...\n        Money::make('Balance'),\n    ];\n}\n```\n\nUSD currency is used by default, you can change this by passing second argument:\n\n```php\nMoney::make('Balance', 'EUR'),\n```\n\nYou may use `locale` method to define locale for formatting value, by default value will be formatted using browser locale:\n\n```php\nMoney::make('Balance')-\u003elocale('ru-RU'),\n```\n\nIf you store money values in database in minor units use `storedInMinorUnits` method. Field will automatically convert minor units to base value for displaying and to minor units for storing:\n\n```php\nMoney::make('Balance', 'EUR')-\u003estoredInMinorUnits(),\n```\n\nIf you need to use a name that doesn't convert to the column name (eg 'Balance' as name and `remaining_balance` as column) you can pass this as the 3rd argument to the make/constructor. \n\nPlease Note: that this, along with all field column names, should be present and usable within your model class else you may encounter SQL errors.\n\n```php\nMoney::make('Balance', 'EUR', 'remaining_balance'),\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvyuldashev%2Fnova-money-field","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvyuldashev%2Fnova-money-field","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvyuldashev%2Fnova-money-field/lists"}