本文整理汇总了PHP中Checkout::where方法的典型用法代码示例。如果您正苦于以下问题:PHP Checkout::where方法的具体用法?PHP Checkout::where怎么用?PHP Checkout::where使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Checkout
的用法示例。
在下文中一共展示了Checkout::where方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: post_deleteops
public function post_deleteops()
{
Log::write('info', Request::ip() . ' User : ' . Auth::user()->fullname . ' Event: Mengapus histori setoran', true);
$data = Input::json();
$checkin = Checkin::find($data->checkin_id);
Checkout::where('operasi_time', '=', $checkin->operasi_time)->where('fleet_id', '=', $checkin->fleet_id)->first()->delete();
$checkin->delete();
return json_encode(array('status' => 1));
}
示例2: post_saveCheck
public function post_saveCheck()
{
Log::write('info', Request::ip() . ' User : ' . Auth::user()->fullname . ' Event: Save Checkin', true);
$data = Input::json();
$id = $data->id;
$docs_ket = $data->std_docs;
$neats = $data->std_neats;
$equips = $data->std_equips;
$sp_kets = $data->ket_sp;
$checkin = Checkin::find($id);
$checkin->km_fleet = $data->km_fleet;
$checkin->rit = $data->rit;
$checkin->incomekm = $data->incomekm;
//$checkin->checkin_step_id = 2;
$checkin->save();
//update yang nyangkut
$checkout = Checkout::where('fleet_id', '=', $checkin->fleet_id)->where('operasi_time', '=', $checkin->operasi_time)->first();
if ($checkout) {
$checkout->checkout_step_id = 7;
$checkout->save();
}
$docs = array();
foreach (Stddoc::all() as $doc) {
array_push($docs, $doc->id);
}
$sps = array();
foreach (Stdfleet::all() as $sp) {
array_push($sps, $sp->id);
}
$cin = Checkindocument::where_checkin_id($id)->first();
if ($cin->operasi_time > date('Y-m-d', Myfungsi::sysdate())) {
$datax['message'] = 'invalide time';
} else {
$cin->std_neats_id = implode(",", $neats);
$cin->std_document_id = implode(",", $docs);
$cin->ket = implode(",", $docs_ket);
$cin->std_equip_id = implode(",", $equips);
$cin->save();
$datax['message'] = 'Data Saved';
}
return json_encode($datax);
}