本文整理汇总了PHP中App\Http\Controllers\Controller::Dividir方法的典型用法代码示例。如果您正苦于以下问题:PHP Controller::Dividir方法的具体用法?PHP Controller::Dividir怎么用?PHP Controller::Dividir使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类App\Http\Controllers\Controller
的用法示例。
在下文中一共展示了Controller::Dividir方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: update
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request)
{
$date = new DateTime();
$cobros = new Cobros_Pagos();
$cobros->where('id', $request->micobro)->update(['supplier_id' => Controller::Dividir($request->contribuyente), 'account_id' => $request->cuenta, 'currency_rate_id' => $request->moneda, 'payment_total' => $request->monto, 'payment_number' => $request->recibo, 'series' => $request->serie, 'payment_date' => $request->fecha, 'timestamp' => $date->getTimestamp()]);
return redirect("pagos");
}
示例2: update
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Requests\validacion_payments $request)
{
if ($request->ajax()) {
$validator = Validator::make($request->all(), $request->rules(), $request->messages());
if ($validator->valid()) {
$date = new DateTime();
$cobros = new Cobros_Pagos();
$cobros->where('id', $request->micobro)->update(['customer_id' => Controller::Dividir($request->contribuyente), 'account_id' => $request->cuenta, 'currency_rate_id' => $request->moneda, 'payment_total' => $request->monto, 'payment_number' => $request->recibo, 'series' => $request->serie, 'payment_date' => $request->fecha, 'timestamp' => $date->getTimestamp()]);
return response()->json(array('correcto' => true), 200);
return redirect("cobros");
}
}
}