Skip to content

Laravel wrapper for simple PHP package for add two numbers

License

Notifications You must be signed in to change notification settings

x1ds/laravel-sum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Sum

Laravel wrapper for simple PHP package for add two numbers

Installation

To get the latest version of Laravel Sum, simply require the project using Composer:

composer require nazububu/laravel-sum

Or manually update require block of composer.json and run composer update.

{
    "require": {
        "nazububu/laravel-sum": "^1.0"
    }
}

Laravel uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.

Laravel without auto-discovery:

If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php

Nazububu\LaravelSum\SumServiceProvider::class,

If you want to use the facade, add this to your facades in app.php:

'Sum' => Nazububu\LaravelSum\Facades\Sum::class,

Using

use Nazububu\LaravelSum\Sum;

$sum = new Sum;
echo $sum->calculate(1, 1); // 2

Testing

You can run tests with command

vendor/bin/phpunit tests/

About

Laravel wrapper for simple PHP package for add two numbers

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages