当前位置: 首页>>代码示例>>PHP>>正文


PHP Cliente::where方法代码示例

本文整理汇总了PHP中Cliente::where方法的典型用法代码示例。如果您正苦于以下问题:PHP Cliente::where方法的具体用法?PHP Cliente::where怎么用?PHP Cliente::where使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Cliente的用法示例。


在下文中一共展示了Cliente::where方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getFiltro

 public function getFiltro()
 {
     $input = Input::all();
     $filtro = $input['filtro'];
     $buscar = $input['buscar'];
     $clientes = array();
     if ($filtro == 'nit') {
         $clientes = Cliente::where('nit', 'like', '%' . $buscar . '%')->paginate(10);
     } elseif ($filtro == 'nombre') {
         $clientes = Cliente::where('nombre', 'like', '%' . $buscar . '%')->paginate(10);
     }
     $mensaje = 'Clientes que contienen <strong>' . $buscar . '</strong> en el ' . strtoupper($filtro);
     Session::flash('mensajeOk', $mensaje);
     return View::make('clientes.listado')->with(compact('clientes', 'input'));
 }
开发者ID:jcyugo,项目名称:distrigases-facturas,代码行数:15,代码来源:ClienteController.php

示例2: putIdPushByCliente

 function putIdPushByCliente(Request $request, Response $response)
 {
     $response = $response->withHeader('Content-type', 'application/json');
     $email = $request->getAttribute('email');
     $data = json_decode($request->getBody(), true);
     try {
         $cliente = Cliente::where('email', '=', $email)->first();
         $cliente->idPush = $data['idPush'];
         $cliente->save();
         $respuesta = json_encode(array('msg' => "Modificado correctamente", "std" => 1, "obj" => $cliente));
         $response = $response->withStatus(200);
     } catch (Exception $err) {
         $respuesta = json_encode(array('msg' => "Error al modificar", "std" => 0, "err" => $err->getMessage()));
         $response = $response->withStatus(404);
     }
     $response->getBody()->write($respuesta);
     return $response;
 }
开发者ID:giocni93,项目名称:BuscaloApi,代码行数:18,代码来源:ClienteControl.php

示例3: changePass

 public function changePass($id = null)
 {
     if (is_null($id) or !is_numeric($id)) {
         return Redirect::to('404.html');
     } else {
         $cliente = Cliente::where('id', '=', $id)->firstOrFail();
         if (is_object($cliente)) {
             $cliente->pasword = Input::get('password');
             return View::make('cliente.change_pass', array('cliente' => $cliente));
         } else {
             return Redirect::to('404.html');
         }
     }
 }
开发者ID:vik70r,项目名称:CTAS,代码行数:14,代码来源:ClienteController.php

示例4: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $clientes = Cliente::where('farmacia_id', 1)->orderBy('created_at', 'dsc')->get();
     // dd($clientes);
     return Response::json($clientes, 200);
 }
开发者ID:kailIII,项目名称:farmacia,代码行数:11,代码来源:ClienteController.php

示例5: verificarCliente

 private function verificarCliente($identificacion)
 {
     return $cliente = Cliente::where('identificacion', $identificacion)->first();
 }
开发者ID:andybolano,项目名称:viaja_seguro,代码行数:4,代码来源:GiroController.php

示例6:

@foreach(@$cuadrilla as $data)
<?php 
$verificar = Cliente::where('saldo', '>', '0')->where('cuadrilla_id', '=', $data->id)->get();
?>
@if(count($verificar) > 0)
<?php 
$total = 0;
?>
<div align="center">
	<h3> {{ $data->cuadrilla }} {{ $data->caporal }} </h3>
</div>
<table class="table">
	<thead>
		<tr>
			<th width="14%" style="text-align: center;">DPI</th>
			<th width="23%" style="text-align: center;">Nombre</th>
			<th width="23%" style="text-align: center;">Direccion Actual</th>
			<th width="9%" style="text-align: center;">Telefono</th>
			<th width="10%" style="text-align: center;">Saldo</th>
			<th width="5%" style="text-align: center;">D.P</th>
			<th width="4%" style="text-align: center;">D.V</th>
			<th width="12%" style="text-align: center;">Pago</th>
		</tr>
	</thead>
	<tbody>
		@foreach(@$data->clientes as $cliente)
		@if($cliente->saldo > 0 )
		<?php 
$dias = DB::table('pagos')->select(DB::raw("DATEDIFF(current_date,max(created_at)) as dias"))->where('cliente_id', '=', $cliente->id)->first();
$diasV = DB::table('ventas')->select(DB::raw("DATEDIFF(current_date,max(created_at)) as dias"))->where('cliente_id', '=', $cliente->id)->first();
开发者ID:nelug,项目名称:ControlDePlanilla,代码行数:30,代码来源:imprimirMeloneraSeleccionada.blade.php

示例7: getCostumers

 public function getCostumers()
 {
     //if( Request::ajax() ){
     $query = Input::get('query');
     $clientes = Cliente::where('nome', 'like', '%' . $query . '%')->orWhere('empresa', 'like', '%' . $query . '%')->get();
     $fornecedores = Fornecedor::where('nome', 'like', '%' . $query . '%')->orWhere('empresa', 'like', '%' . $query . '%')->get();
     $vendedores = Vendedor::where('nome', 'like', '%' . $query . '%')->orWhere('empresa', 'like', '%' . $query . '%')->get();
     foreach ($clientes as $cliente) {
         $suggestions[] = array("value" => $cliente->nome . " [" . $cliente->empresa . "]", "data" => array('type' => 'Clientes (' . count($clientes) . ')', 'obj' => json_encode($cliente)));
     }
     foreach ($fornecedores as $fornecedor) {
         $suggestions[] = array("value" => $fornecedor->nome . " [" . $fornecedor->empresa . "]", "data" => array('type' => 'Fornecedores (' . count($fornecedores) . ')'));
     }
     foreach ($vendedores as $vendedor) {
         $suggestions[] = array("value" => $vendedor->nome . " [" . $vendedor->empresa . "]", "data" => array('type' => 'Vendedores (' . count($vendedores) . ')'));
     }
     $costumers = array('suggestions' => $suggestions);
     //$costumers = Cliente::all();
     return Response::json($costumers);
     //}
 }
开发者ID:waldenylson,项目名称:alfredapp,代码行数:21,代码来源:ClienteController.php

示例8: search

 public function search()
 {
     $modalidad = Modalidad::lists('id', 'monto');
     $pago = Pagos::max('id');
     $id = Input::get('id_cliente');
     if (is_null($id) or !is_numeric($id)) {
         return Redirect::to('404.html');
     } else {
         $cliente = Cliente::where('id', '=', $id)->firstOrFail();
         if (is_object($cliente)) {
             return View::make('pagos.showCliente', array('cliente' => $cliente, 'modalidad' => $modalidad, 'pago' => $pago));
             //return Redirect::to('pagos/create')->withErrors($respuesta['mensaje'] )->withInput();
             //return Redirect::to('pagos/create/',array('cliente'=>$cliente,'modalidad'=>$modalidad));
         } else {
             return Redirect::to('404.html');
         }
     }
 }
开发者ID:vik70r,项目名称:CTAS,代码行数:18,代码来源:PagosController.php

示例9: getContacts

 public function getContacts()
 {
     //if( Request::ajax() ){
     $query = Input::get('query');
     $clientes = Cliente::where('email', 'like', '%' . $query . '%')->get();
     $fornecedores = Fornecedor::where('email', 'like', '%' . $query . '%')->get();
     $vendedores = Vendedor::where('email', 'like', '%' . $query . '%')->get();
     foreach ($clientes as $cliente) {
         $suggestions[] = array("value" => $cliente->email, "data" => array('type' => 'Clientes (' . count($clientes) . ')'));
     }
     foreach ($fornecedores as $fornecedor) {
         $suggestions[] = array("value" => $fornecedor->email, "data" => array('type' => 'Fornecedores (' . count($fornecedores) . ')'));
     }
     foreach ($vendedores as $vendedor) {
         $suggestions[] = array("value" => $vendedor->email, "data" => array('type' => 'Vendedores (' . count($vendedores) . ')'));
     }
     $contacts = array('suggestions' => $suggestions);
     //$contacts = Cliente::all();
     return Response::json($contacts);
     //}
 }
开发者ID:waldenylson,项目名称:alfredapp,代码行数:21,代码来源:EmailsController.php


注:本文中的Cliente::where方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。