public function bill($accountId, $amount) { $account = Account::findOrFail($accountId); $reqAmount = intval($amount); echo "<h3>刷卡金額: {$reqAmount}, 刷卡人姓名:{$account->name}</h3>"; }
public function setAccount($account_id) { $this->account = Account::findOrFail($account_id); }