Lae/app/View/Components/Payment.php
iVampireSP.com 40c4894464
增加 转账
增加 手动添加 Drops
2022-11-16 19:49:12 +08:00

45 lines
993 B
PHP

<?php
namespace App\View\Components;
use Illuminate\View\Component;
class Payment extends Component
{
public $payment = null;
/**
* Create a new component instance.
*
* @return void
*/
public function __construct($payment)
{
//
$this->payment = $payment;
}
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|\Closure|string
*/
public function render()
{
$this->payment = match ($this->payment) {
'alipay' => '支付宝',
'wechat', 'wepay' => '微信支付',
'drops' => 'Drops',
'balance', 'balances' => '余额',
'unfreeze' => '解冻',
'freeze' => '冻结',
'console' => '控制台',
'transfer' => '转账',
default => $this->payment,
};
return view('components.payment', ['payment' => $this->payment]);
}
}