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


PHP Agenda::where方法代码示例

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


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

示例1: show

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function show($id)
 {
     if (Payment::VeryPayment() == false) {
         return View::make('clinic.payment.renews-payment');
     }
     $agenda = Agenda::where('doctor_id', $id)->first();
     $CustomDay = CustomDay::where('agenda_id', $agenda->id)->get();
     return View::make('clinic.doctors.customDay')->with('customddays', $CustomDay)->with('agendaID', $agenda->id);
 }
开发者ID:jnicolasbc,项目名称:admin_swp_com,代码行数:14,代码来源:ClinicDoctorsCustomDaysController.php

示例2: update

 public function update($id)
 {
     $data = array("first_name" => Input::get("first_name"), "last_name" => Input::get("last_name"), "email" => Input::get("email"), "phone" => Input::get("phone"), "picture" => Input::file("picture"), "specialty_id" => Input::get("specialty_id"), "dating_duration" => Input::get("dating_duration"));
     $rules = array("first_name" => 'required|min:1|max:255', "last_name" => 'required|min:1|max:100', "email" => 'required|min:1', "phone" => 'required|min:1|max:100', "specialty_id" => 'required|min:3|max:255', "dating_duration" => 'required|min:1|max:3', "picture" => 'mimes:jpeg,gif,png');
     $messages = array('required' => 'El campo :attribute es obligatorio.', 'min' => 'El campo :attribute no puede tener menos de :min carácteres.', 'email' => 'El campo :attribute debe ser un email válido.', 'max' => 'El campo :attribute no puede tener más de :max carácteres.', 'numeric' => 'El campo :attribute debe contener solo numeros', 'mimes' => 'El formato de la imagen logo debe ser jpg, git, png');
     $validation = Validator::make(Input::all(), $rules, $messages);
     //si la validación falla redirigimos al formulario de registro con los errores
     //y con los campos que nos habia llenado el usuario
     if ($validation->fails()) {
         return Redirect::to('/doctor/profile')->withErrors($validation)->withInput();
     } else {
         $doctor = Doctor::find($id);
         $agenda = Agenda::where('doctor_id', $doctor->id)->first();
         $agenda->dating_duration = Input::get("dating_duration");
         $agenda->save();
         $espes = explode(',', Input::get("specialty_id"));
         $espeuok = '';
         foreach ($espes as $espe) {
             $very = Specialty::where('name_es', $espe)->first();
             if ($very) {
                 $espeuok = $espeuok . ',' . $very->id;
             }
         }
         $doctor->specialty_id = $espeuok;
         $doctor->save();
         $user = User::find($doctor->user_id);
         $user->first_name = $data['first_name'];
         $user->last_name = $data['last_name'];
         $user->save();
         $profile = Profile::where('user_id', $doctor->user_id)->first();
         if (Input::file('picture') != NULL) {
             //agrega imagen de logo
             $file_logo = Input::file('picture');
             $ext = Input::file('picture')->getClientOriginalExtension();
             $nameIMG = date('YmdHis');
             $logo = $nameIMG . '.' . $ext;
             $logo = 'assets/doctor/images/profile_pic/profile_' . $logo;
             $profile->picture = $logo;
         }
         $profile->phone = Input::get("phone");
         $profile->save();
         if ($profile) {
             if (Input::file('picture') != NULL) {
                 $file_logo->move("assets/doctor/images/profile_pic/", $logo);
             }
             return Redirect::to('/doctor/profile')->withFlash_message("Guardado Exitosamente");
         } else {
             return Redirect::to('/doctor/profile')->withErrors("Error")->withInput();
         }
     }
 }
开发者ID:jnicolasbc,项目名称:admin_swp_com,代码行数:51,代码来源:DoctorController.php

示例3: getConfigDay

 public function getConfigDay()
 {
     if (Payment::VeryPayment() == false) {
         return View::make('clinic.payment.renews-payment');
     }
     $doctor = Doctor::doctorLogin();
     $agenda = Agenda::where('doctor_id', $doctor)->first()->id;
     $configDay = Configday::where('agenda_id', $agenda)->get();
     if ($configDay->isEmpty()) {
         return View::make('clinic.doctor.config.ConfigDay')->with('agenda', $agenda);
     } else {
         return View::make('clinic.doctor.config.ConfigDay')->with('agenda', $agenda)->with('configDay', $configDay);
     }
 }
开发者ID:jnicolasbc,项目名称:admin_swp_com,代码行数:14,代码来源:PatientsController.php

示例4: generarTurnos

 public function generarTurnos($agenda_id = NULL)
 {
     $errores = true;
     if (empty($agenda_id)) {
         $agendas = Agenda::whereNotIn('id', function ($query) {
             $query->select('agenda_id')->from('turnos');
         })->where('habilitado_turnos', '=', 1)->get();
     } else {
         $agendas = Agenda::where('id', $agenda_id)->get();
     }
     foreach ($agendas as $agenda) {
         $coe = $agenda->centroOdontologoEspecialidad;
         $horario_desde = date('H:i', strtotime(substr_replace($coe->horario_desde, ':', 2, 0)));
         $horario_hasta = date('H:i', strtotime(substr_replace($coe->horario_hasta, ':', 2, 0)));
         $duracion = $coe->duracion_turno;
         $hora = $horario_desde;
         $hora_hasta = date('H:i', strtotime("+" . $duracion . " minutes", strtotime($hora)));
         $turnos = array();
         while (strtotime($hora) < strtotime($horario_hasta)) {
             $turno = array();
             $turno["agenda_id"] = $agenda->id;
             $turno["hora_desde"] = str_replace(":", "", $hora);
             $turno["hora_hasta"] = str_replace(":", "", $hora_hasta);
             $turno["tipo_turno"] = 'T';
             // turno
             $turno["estado"] = 'L';
             // libre
             $turno["created_at"] = date("Y-m-d H:i:s");
             $turno["updated_at"] = date("Y-m-d H:i:s");
             $turnos[] = $turno;
             $hora = $hora_hasta;
             $hora_hasta = date('H:i', strtotime("+" . $duracion . " minutes", strtotime($hora)));
         }
         $e = Turno::insert($turnos);
         if (!$e) {
             $errores = false;
         }
     }
     return $errores;
 }
开发者ID:armandolazarte,项目名称:clinicasapp,代码行数:40,代码来源:CentroOdontologoEspecialidadController.php

示例5: getPatientAppointmentsHistory

 public function getPatientAppointmentsHistory($doctor, $patient)
 {
     if (Payment::VeryPayment() == false) {
         return View::make('clinic.payment.renews-payment');
     }
     $Agenda = Agenda::where('doctor_id', $doctor)->first();
     $Appointment = Appointment::where('patient_id', $patient)->where('agenda_id', $Agenda->id)->get();
     return View::make('clinic.doctors.history')->with('Appointment', $Appointment);
 }
开发者ID:jnicolasbc,项目名称:admin_swp_com,代码行数:9,代码来源:ClinicDoctorsController.php

示例6:

																						<th class="text-center">Imagen</th>
																						<th class="text-center">Name</th>
																						<th class="text-center">Email</th>
																						<th class="text-center">Phone</th>
																						<th class="text-center">Status</th>
                                            <th class="text-center">Confirmacion Automatica</th>
																						<th class="text-center">Horarios/Calendario</th>
                                            <th class="text-center">Editar/Eliminar</th>
																				</tr>
																		</thead>
																		<tbody align="center"> 																				
																				@foreach($doctors as $d)
																					<?php 
$doc = User::find($d->user_id);
$profile = Profile::where('user_id', $d->user_id)->first();
$age = Agenda::where('doctor_id', $d->id)->first();
?>
																					<tr class="odd gradeX">	
																						<td><img class="circle profile-table" src="@if($profile->picture!="") {{url($profile->picture)}} @else http://agenda.dev/assets/doctor/images/profile_pic/default.png @endif" alt=""></td>																					
																						<td>{{$doc->getFullName()}}</td>																					
																						<td>{{$doc->email}}</td>																					
																						<td>{{$profile->phone}}</td>																					
																						<td>
																							@if($d->state!=0)
								                              <div class="col-sm-4 iSwitch flat-switch">
																								<div class="switch switch-small">
																									<input type="checkbox" class="checkAjax" data-toggle="tooltip" data-placement="left"  title="Activado" state="{{$d->id}}" checked>
																								</div>																												
																							</div><!-- //col-sm-4 -->
																							@else
												                      <div class="col-sm-4 iSwitch flat-switch">
开发者ID:jnicolasbc,项目名称:admin_swp_com,代码行数:31,代码来源:index.blade.php

示例7: getAgendaDay

 public function getAgendaDay()
 {
     if (Payment::VeryPayment() == false) {
         return View::make('clinic.payment.renews-payment');
     }
     $id = Doctor::doctorLogin();
     $agenda = Agenda::where('doctor_id', $id)->first();
     $dt = Carbon::now();
     $bussi = Business::where('agenda_id', $agenda->id)->first()->id;
     if ($dt->dayOfWeek == 0) {
         $dia = 'Sunday';
     } elseif ($dt->dayOfWeek == 1) {
         $dia = 'Monday';
     } elseif ($dt->dayOfWeek == 2) {
         $dia = 'Tuesday';
     } elseif ($dt->dayOfWeek == 3) {
         $dia = 'Wednesday';
     } elseif ($dt->dayOfWeek == 4) {
         $dia = 'Thursday';
     } elseif ($dt->dayOfWeek == 5) {
         $dia = 'Friday';
     } else {
         $dia = 'Saturday';
     }
     $CustomDay = CustomDay::where('agenda_id', $agenda->id)->get();
     $Configday = Configday::where('day', $dia)->where('agenda_id', $agenda->id)->first();
     $AgendaAppo = Appointment::where('agenda_id', $agenda->id)->get();
     return View::make('clinic.doctor.Appointments.AppointmentsDay')->with('agendaAppo', $AgendaAppo)->with('configday', $Configday)->with('customddays', $CustomDay)->with('bussi', $bussi)->with('agenda', $agenda);
 }
开发者ID:jnicolasbc,项目名称:admin_swp_com,代码行数:29,代码来源:AppointmentsController.php

示例8: existeAgenda

 public function existeAgenda($fecha)
 {
     $agenda = Agenda::where('centro_odontologo_especialidad_id', '=', $this->id)->where('fecha', '=', $fecha)->get()->toArray();
     return count($agenda);
 }
开发者ID:armandolazarte,项目名称:clinicasapp,代码行数:5,代码来源:CentroOdontologoEspecialidad.php


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