本文整理汇总了PHP中Checkout::join方法的典型用法代码示例。如果您正苦于以下问题:PHP Checkout::join方法的具体用法?PHP Checkout::join怎么用?PHP Checkout::join使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Checkout
的用法示例。
在下文中一共展示了Checkout::join方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: post_searchDriver
public function post_searchDriver()
{
$jsondata = Input::json();
$date = $jsondata->date;
$timestamp = strtotime($date);
$drivers = Checkout::join('drivers as d', 'd.id', '=', 'checkouts.driver_id')->where_operasi_time($date)->where('checkouts.pool_id', '=', Auth::user()->pool_id)->where('d.fg_blocked', '=', 1)->where('d.nip', 'LIKE', '%' . $jsondata->taxi_number . '%')->get(array('d.name', 'd.nip', 'checkouts.id'));
$driverdata = array_map(function ($object) {
return $object->to_array();
}, $drivers);
$data['drivers'] = $driverdata;
return json_encode($data);
}
示例2: post_searchChekouts
public function post_searchChekouts()
{
$jsondata = Input::json();
$date = $jsondata->date;
$timestamp = strtotime($date);
//list armada on checkouts
$fleets = Checkout::join('fleets as f', 'f.id', '=', 'checkouts.fleet_id')->where_operasi_time($date)->where('checkouts.pool_id', '=', Auth::user()->pool_id)->where('f.taxi_number', 'LIKE', '%' . $jsondata->taxi_number . '%')->get(array('f.taxi_number', 'checkouts.id'));
$fleetdata = array_map(function ($object) {
return $object->to_array();
}, $fleets);
$data['fleets'] = $fleetdata;
return json_encode($data);
}
示例3: get_fleetsoncheckin
public function get_fleetsoncheckin()
{
$date = Input::get('date', date('Y-m-d'));
$pool_id = Auth::user()->pool_id;
$fleets_on_checkin = Checkout::join('fleets as f', 'f.id', '=', 'checkouts.fleet_id')->where_operasi_time($date)->where('checkouts.pool_id', '=', $pool_id)->where('checkouts.checkout_step_id', '=', 4)->where('checkouts.operasi_status_id', '=', 1)->order_by('f.taxi_number', 'asc')->get(array('f.taxi_number', 'checkouts.id'));
$datas = array_map(function ($object) {
return $object->to_array();
}, $fleets_on_checkin);
return Response::json($datas);
}