Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ Laravel includes a variety of global "helper" PHP functions. Many of these funct
<div class="collection-method-list" markdown="1">

[Number::abbreviate](#method-number-abbreviate)
[Number::bitRate](#method-number-bit-rate)
[Number::clamp](#method-number-clamp)
[Number::currency](#method-number-currency)
[Number::defaultCurrency](#method-default-currency)
Expand Down Expand Up @@ -1602,6 +1603,27 @@ $number = Number::abbreviate(1230000, precision: 2);
// 1.23M
```

<a name="method-number-bit-rate"></a>
#### `Number::bitRate()` {.collection-method}

The `Number::bitRate` method returns the bit rate representation of the given bit value as a string:

```php
use Illuminate\Support\Number;

$rate = Number::bitRate(1000);

// 1 Kbps

$rate = Number::bitRate(1000 * 1000);

// 1 Mbps

$rate = Number::bitRate(1000, precision: 2);

// 1.00 Kbps
```

<a name="method-number-clamp"></a>
#### `Number::clamp()` {.collection-method}

Expand Down