PHPackages                             abhimanyusharma003/conversion - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. abhimanyusharma003/conversion

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

abhimanyusharma003/conversion
=============================

Laravel Unit Conversion

5160.4k↓50%18[3 issues](https://github.com/abhimanyu003/conversion/issues)[2 PRs](https://github.com/abhimanyu003/conversion/pulls)1PHP

Since Aug 31Pushed 3y ago4 watchersCompare

[ Source](https://github.com/abhimanyu003/conversion)[ Packagist](https://packagist.org/packages/abhimanyusharma003/conversion)[ RSS](/packages/abhimanyusharma003-conversion/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (1)

Laravel Unit Conversion
-----------------------

[](#laravel-unit-conversion)

Library help to convert units.

Units supported
---------------

[](#units-supported)

- Acceleration
- Angle
- Area
- Storage
- Current
- Fuel
- Length
- Mass
- Pressure
- Speed
- Temperature
- Time
- Voltage
- Volume

Installation
------------

[](#installation)

- Add below line to `composer.json `

```
// ...
"abhimanyusharma003/conversion": "dev-master"
 // ...
```

- Run `composer update` or `composer install `
- Open `config/app.php` and add the service provider to your `providers` array.

```
    Abhimanyu003\Conversion\ConversionServiceProvider::class
```

- Add Aliases

```
    'Conversion'  => Abhimanyu003\Conversion\Facades\Conversion::class
```

How to use
----------

[](#how-to-use)

```
Conversion::convert($value,'type')->to('type');
```

Formatting results use

```
Conversion::convert($value,'type')->to('type')
->format(int decimal,'decimal place modifier','thousand place modifer');
```

Example
-------

[](#example)

- Converting MB to kb

```
Conversion::convert(1, 'megabyte')->to('kilobyte'); // output 1,024.00 ( two decimal place )

// Formatting the output
Conversion::convert(1, 'megabyte')->to('kilobyte')->format(0,'.',','); // output 1,024 ( no decimal place )
```

- Converting mm to cm

```
Conversion::convert(1000,'millimetre')->to('centimetre');
```

- Converting kg to g

```
Conversion::convert(1,'kilogram')->to('gram');
```

Conversion Chart
----------------

[](#conversion-chart)

Acceleration
------------

[](#acceleration)

```
   METRE_PER_SECOND_SQUARE

```

Angle
-----

[](#angle)

```
   TURN
   RADIAN
   DEGREE
   GRADIAN

```

Area
----

[](#area)

```
   SQUARE_METRE
   HECTARE
   SQUARE_KILOMETRE
   SQUARE_INCH
   SQUARE_FEET
   SQUARE_YARD
   ACRE
   SQUARE_MILE

```

Storage
-------

[](#storage)

```
   BIT
   BYTE
   KILOBIT
   KILOBYTE
   MEGABIT
   MEGABYTE
   GIGABIT
   GIGABYTE
   TERABIT
   TERABYTE
   PETABIT
   PETABYTE

```

Current
-------

[](#current)

```
   STATAMPERE
   MICROAMPERE
   MILLIAMPERE
   AMPERE
   ABAMPERE
   KILOAMPERE

```

Fuel
----

[](#fuel)

```
   KILOMETRES_PER_LITRE
   LITRE_PER_100_KILOMETRE
   MILES_PER_GALLON
   US_MILES_PER_GALLON

```

Length
------

[](#length)

```
   MILLIMETRE
   CENTIMETRE
   METRE
   KILOMETRE
   INCH
   FOOT
   YARD
   MILE
   NAUTICAL_MILE

```

Mass
----

[](#mass)

```
   MICROGRAM
   MILLIGRAM
   GRAM
   KILOGRAM
   METRIC_TON
   OUNCE
   POUND
   STONE
   SHORT_TON
   LONG_TON

```

Pressure
--------

[](#pressure)

```
   PASCAL
   KILOPASCAL
   MEGAPASCAL
   BAR
   MILLIMETRES_OF_MERCURY
   INCHES_OF_MERCURY
   POUNDS_PER_SQUARE_INCH
   ATMOSPHERE

```

Speed
-----

[](#speed)

```
   METRE_PER_SECOND
   KILOMETRES_PER_HOUR
   FEET_PER_SECOND
   MILES_PER_HOUR
   KNOT

```

Temperature
-----------

[](#temperature)

```
   CELSIUS
   FAHRENHEIT
   KELVIN

```

Time
----

[](#time)

```
   NANOSECOND
   MICROSECOND
   MILLISECOND
   SECOND
   MINUTE
   HOUR
   DAY
   WEEK
   MONTH
   YEAR
   DECADE
   CENTURY
   MILLENIUM

```

Voltage
-------

[](#voltage)

```
   VOLT
   KILOVOLT

```

Volume
------

[](#volume)

```
   MILLILITRE
   LITRE
   CUBIC_METRE
   GALLON
   QUART
   PINT
   TABLESPOON
   TEASPOON
   US_GALLON
   US_QUART
   US_PINT
   US_CUP
   US_OUNCE
   US_TABLESPOON
   US_TEASPOON
   CUBIC_INCH
   CUBIC_FOOT

```

Contribute
----------

[](#contribute)

Feel free to contribute and update the rep.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity40

Moderate usage in the ecosystem

Community22

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 79.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/b396fac7bff5c9561f7c7d00968d1bb55dfe2daef42e3010f39d9f7ad3d4ff04?d=identicon)[abhimanyu003](/maintainers/abhimanyu003)

---

Top Contributors

[![abhimanyu003](https://avatars.githubusercontent.com/u/265913?v=4)](https://github.com/abhimanyu003 "abhimanyu003 (23 commits)")[![mpash](https://avatars.githubusercontent.com/u/48454220?v=4)](https://github.com/mpash "mpash (2 commits)")[![blueclock](https://avatars.githubusercontent.com/u/586174?v=4)](https://github.com/blueclock "blueclock (1 commits)")[![drmonkeyninja](https://avatars.githubusercontent.com/u/357623?v=4)](https://github.com/drmonkeyninja "drmonkeyninja (1 commits)")[![marcioAlmada](https://avatars.githubusercontent.com/u/227395?v=4)](https://github.com/marcioAlmada "marcioAlmada (1 commits)")[![RandyBooth](https://avatars.githubusercontent.com/u/782262?v=4)](https://github.com/RandyBooth "RandyBooth (1 commits)")

### Embed Badge

![Health badge](/badges/abhimanyusharma003-conversion/health.svg)

```
[![Health](https://phpackages.com/badges/abhimanyusharma003-conversion/health.svg)](https://phpackages.com/packages/abhimanyusharma003-conversion)
```

###  Alternatives

[geokit/geokit

Geo-Toolkit for PHP

251924.7k6](/packages/geokit-geokit)[arielmejiadev/larapex-charts

Package to provide easy api to build apex charts on Laravel

302445.7k](/packages/arielmejiadev-larapex-charts)[geshi/geshi

Generic Syntax Highlighter

1741.1M13](/packages/geshi-geshi)[statikbe/laravel-cookie-consent

Cookie consent modal for EU

213396.7k](/packages/statikbe-laravel-cookie-consent)[cognesy/instructor-php

The complete AI toolkit for PHP: unified LLM API, structured outputs, agents, and coding agent control

310107.9k1](/packages/cognesy-instructor-php)[afragen/wp-dependency-installer

Library that helps WordPress plugin dependency management.

217111.4k](/packages/afragen-wp-dependency-installer)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
