PHPackages                             aadha/laravel\_math - 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. aadha/laravel\_math

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

aadha/laravel\_math
===================

basic math related calculation

03PHP

Since Mar 11Pushed 1y ago1 watchersCompare

[ Source](https://github.com/aadhar-rglabs/laravel_math)[ Packagist](https://packagist.org/packages/aadha/laravel_math)[ RSS](/packages/aadha-laravel-math/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Math Library
====================

[](#laravel-math-library)

This is a simple math library for Laravel that provides functions to calculate Fibonacci numbers and check if a number is prime.

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

[](#installation)

1. Clone the repository to your local machine.
2. Navigate to the project directory.
3. Run `composer install` to install dependencies.

Usage
-----

[](#usage)

### Fibonacci

[](#fibonacci)

To calculate the Fibonacci number of a given integer:

```
use Aadhar\Math\Math;

echo Math::fibonacci(10); // Output: 55
```

### Prime Check

[](#prime-check)

To check if a given number is prime:

```
use Aadhar\Math\Math;

echo Math::isPrime(7); // Output: true
```

Using with Laravel
------------------

[](#using-with-laravel)

1. Add the service provider to the `config/app.php` file in the `providers` array:

    ```
    'providers' => [
        // ...existing code...
        Aadhar\Math\MathServiceProvider::class,
    ],
    ```
2. (Optional) Add the alias to the `config/app.php` file in the `aliases` array:

    ```
    'aliases' => [
        // ...existing code...
        'Math' => Aadhar\Math\Facades\Math::class,
    ],
    ```
3. Use the Math library in your Laravel application:

    ```
    use Math;

    $fibonacci = Math::fibonacci(10);
    $isPrime = Math::isPrime(7);
    ```

License
-------

[](#license)

This project is licensed under the MIT License.

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity15

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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/c72f03490d617ed37cec69d46c6a52c9506da59150e6e1d88ee60edf72d0acae?d=identicon)[aadhar2025](/maintainers/aadhar2025)

---

Top Contributors

[![aadhar-rglabs](https://avatars.githubusercontent.com/u/158032351?v=4)](https://github.com/aadhar-rglabs "aadhar-rglabs (6 commits)")

### Embed Badge

![Health badge](/badges/aadha-laravel-math/health.svg)

```
[![Health](https://phpackages.com/badges/aadha-laravel-math/health.svg)](https://phpackages.com/packages/aadha-laravel-math)
```

###  Alternatives

[illuminate/conditionable

The Illuminate Conditionable package.

9043.1M32](/packages/illuminate-conditionable)[codingfreaks/cf-cookiemanager

Manage cookies, scripts, and GDPR compliance on your Typo3 website with CodingFreaks Typo3 Cookie Manager. Customize cookie banners, streamline workflow, and enhance user experience. Ensure GDPR compliance and take control of cookie management with our Typo3 cookie management extension. Visit the official Typo3 Documentation page to learn more.

1625.8k](/packages/codingfreaks-cf-cookiemanager)

PHPackages © 2026

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