binghua/turnipscalculate

v1.1.1 2020-09-30 07:13 UTC

This package is auto-updated.

Last update: 2024-04-29 04:21:14 UTC


README

how to install

composer require binghua/turnipscalculate

how to use

use BingHua\TurnipsCalculate\TurnipsFactory;

public function __construct(TurnipsFactory $turnipsFactory)
    {
        $this->turnipsFactory = $turnipsFactory;
    }

    public function create()
    {
        $type = '好的大頭菜'
        //$type = '壞掉的大頭菜'
        $price = 400;
        $count = 10
        return $this->turnipsFactory::factory($type, $price, $count)->calculatePrice();
    }