承接 aadha/laravel_math 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

aadha/laravel_math

Composer 安装命令:

composer require aadha/laravel_math

包简介

basic math related calculation

README 文档

README

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

Installation

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

Usage

Fibonacci

To calculate the Fibonacci number of a given integer:

use Aadhar\Math\Math;

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

Prime Check

To check if a given number is prime:

use Aadhar\Math\Math;

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

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

This project is licensed under the MIT License.

统计信息

  • 总下载量: 3
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2025-03-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固