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


PHP Evento::find方法代码示例

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


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

示例1: run

 public function run()
 {
     $participants = DB::table('event_participant')->get();
     foreach ($participants as $participant) {
         $player = Player::find($participant->player_id);
         $user = User::find($participant->user_id);
         $event = Evento::find($participant->event_id);
         $payment = Payment::find($participant->payment_id);
         $uuid = Uuid::generate();
         $new = new Participant();
         $new->id = $uuid;
         $new->firstname = $player->firstname;
         $new->lastname = $player->lastname;
         $new->due = $event->getOriginal('fee');
         $new->early_due = $event->getOriginal('early_fee');
         $new->early_due_deadline = $event->early_deadline;
         $new->method = 'full';
         $new->plan_id = Null;
         $new->player_id = $player->id;
         $new->event_id = $participant->event_id;
         $new->accepted_on = $participant->created_at;
         $new->accepted_by = $user->profile->firstname . " " . $user->profile->lastname;
         $new->accepted_user = $participant->user_id;
         $new->status = 1;
         $new->created_at = $participant->created_at;
         $new->updated_at = $participant->updated_at;
         $new->save();
         $update = Item::where('payment_id', '=', $payment->id)->firstOrFail();
         $update->participant_id = $uuid;
         $update->save();
     }
 }
开发者ID:illuminate3,项目名称:league-production,代码行数:32,代码来源:FollowersTableSeeder.php

示例2: getListadoEventoss

 public static function getListadoEventoss($usuario_id)
 {
     $obj = new Evento();
     $conditions = "usuario_id = {$usuario_id}";
     $columns = "id, start, end, color, author, notes, urlFile, idPosicion, hour1, day1, hour2, day2, fileUrl, networks, description";
     return $obj->find("columns: {$columns}", "conditions: {$conditions}");
 }
开发者ID:arleincho,项目名称:bee,代码行数:7,代码来源:evento.php

示例3: register_visualization

 public function register_visualization($document_id)
 {
     $documento = \Documento::find($document_id);
     if (!$documento) {
         return \Response::json(['error' => 'No existe ningun documento con id = ' . $document_id], 200);
     }
     $auth_token = \Request::header('authorization');
     $user = \User::where('auth_token', '=', $auth_token)->first();
     $idevento = \Input::get('session_id');
     if ($idevento) {
         $evento = \Evento::find($idevento);
         if (!$evento) {
             return \Response::json(['error' => 'No existe ninguna sesión con id = ' . $idevento], 200);
         }
         $v = new \Visualizacion();
         $v->idusers = $user->id;
         $v->ideventos = $evento->ideventos;
         $v->iddocumentos = $document_id;
         $v->save();
     } else {
         // obtener todos los eventos asociados al documento
         $eventos = \DocumentosEvento::where('iddocumentos', '=', $document_id)->get();
         foreach ($eventos as $evento) {
             $v = new \Visualizacion();
             $v->idusers = $user->id;
             $v->ideventos = $evento->ideventos;
             $v->iddocumentos = $document_id;
             $v->save();
         }
     }
     return \Response::json(['success' => 1], 200);
 }
开发者ID:EMerino236,项目名称:afiperularavel,代码行数:32,代码来源:DocumentosController.php

示例4: handleCreate

 public function handleCreate()
 {
     try {
         if (Request::ajax()) {
             $error = false;
             $idEvento = Input::get('idevento');
             $eventoUpdated = Evento::find($idEvento);
             if ($eventoUpdated) {
                 $eventoUpdated->idconfiguraciontrampa = Input::get('idctrampa');
                 $eventoUpdated->fechaevento = Input::get('fechaevento');
                 $eventoUpdated->idclasificaiontrampa = Input::get('idclasificacion');
                 $eventoUpdated->semana = Input::get('semana');
                 $eventoUpdated->observaciones = Input::get('observaciones');
                 $eventoUpdated->save();
             } else {
                 $evento = new Evento();
                 $evento->idconfiguraciontrampa = Input::get('idctrampa');
                 $evento->fechaevento = Input::get('fechaevento');
                 $evento->idclasificaiontrampa = Input::get('idclasificacion');
                 $evento->semana = Input::get('semana');
                 $evento->observaciones = Input::get('observaciones');
                 $evento->save();
             }
             $resultado = array('error' => false, 'msg' => 'created successfully');
             return Response::json($resultado);
         }
     } catch (Exception $ex) {
         $resultado = array('error' => true, 'msg' => 'Error saving data');
         return Response::json($resultado);
     }
 }
开发者ID:rmeza,项目名称:ipm,代码行数:31,代码来源:EventoController.php

示例5: postAct

 public function postAct()
 {
     $apagar = Evento::find(Input::get('id'));
     $apagar->titulo = Input::get('titulo');
     $apagar->sinopse = Input::get('sinopse');
     $apagar->categoria = Input::get('categoria');
     $apagar->protagonista = Input::get('protagonista');
     $apagar->autor = Input::get('autor');
     $apagar->update();
     $eventos = Evento::all();
     return View::make('Evento.EventoVisu')->with('eventos', $eventos);
 }
开发者ID:hillasAd,项目名称:Exame,代码行数:12,代码来源:EventoController.php

示例6: vistaEditar

 public function vistaEditar($id, $next)
 {
     //Me quedo con el item, buscando por id
     $evento = Evento::find($id);
     $secciones = parent::seccionesDinamicas();
     if ($evento) {
         $this->array_view['item'] = $evento->texto()->item();
         $this->array_view['evento'] = $evento;
         $this->array_view['secciones'] = $secciones;
         $this->array_view['continue'] = $next;
         return View::make($this->folder_name . '.agregar', $this->array_view);
     } else {
         $this->array_view['texto'] = Lang::get('controllers.error_carga_pagina');
         return View::make($this->project_name . '-error', $this->array_view);
     }
 }
开发者ID:tatu-carreta,项目名称:mariasanti_v2,代码行数:16,代码来源:EventoController.php

示例7: obtenerDatosEvento

 public function obtenerDatosEvento()
 {
     if (Request::ajax()) {
         $evento = Evento::find(Input::get("id"));
         $reunion = Reunion::whereEventosId(Input::get("id"))->first();
         $datos = array();
         $datos['nombre'] = $reunion->asunto;
         $fechayhora = $evento->start;
         $fechayhora = explode(" ", $fechayhora);
         $datos['ordinaria'] = $reunion->ordinaria == '1' ? "Ordinaria" : "Extraordinaria";
         $datos['fecha'] = $fechayhora[0];
         $datos['hora'] = $fechayhora[1];
         $datos['asignatura'] = Asignatura::whereId(Asignatura::asignaturaJDAActual())->pluck('nombre');
         $datos['departamento'] = Departamento::whereId(Academia::whereId(Asignatura::whereId(Asignatura::asignaturaJDAActual())->pluck('academia_id'))->pluck('departamentos_id'))->pluck('nombre');
         $datos['fecha_actual'] = date('Y-m-d');
         return Response::json(array('success' => true, 'datos' => $datos));
     }
 }
开发者ID:SEODiaz,项目名称:SIGA-4,代码行数:18,代码来源:JDAController.php

示例8: event

 public function event($id)
 {
     //add security to avoid stealing of information
     $user = Auth::user();
     Excel::create('roster', function ($excel) use($id) {
         $excel->sheet('Sheetname', function ($sheet) use($id) {
             $event = Evento::find($id);
             $team = array();
             if ($event->children->count() > 0) {
                 foreach ($event->children as $e) {
                     foreach ($e->participants as $member) {
                         $team[] = $member;
                     }
                 }
             } else {
                 $team = Participant::where('event_id', '=', $id)->with('event')->get();
             }
             $sheet->setOrientation('landscape');
             $sheet->loadView('export.lacrosse.roster', ['members' => $team]);
         });
     })->download('xlsx');
 }
开发者ID:illuminate3,项目名称:league-production,代码行数:22,代码来源:ExportController.php

示例9: destacar

 public static function destacar($input)
 {
     $respuesta = array();
     $reglas = array();
     $validator = Validator::make($input, $reglas);
     if ($validator->fails()) {
         $respuesta['mensaje'] = $validator;
         $respuesta['error'] = true;
     } else {
         $evento = Evento::find($input['evento_id']);
         $data = array('item_id' => $evento->texto()->item()->id, 'seccion_id' => $evento->texto()->item()->seccionItem()->id);
         $item = Item::destacar($data);
         $respuesta['mensaje'] = 'Evento destacado.';
         $respuesta['error'] = false;
         $respuesta['data'] = $evento;
     }
     return $respuesta;
 }
开发者ID:tatu-carreta,项目名称:mariasanti_v2,代码行数:18,代码来源:Evento.php

示例10: PaymentStore

 public function PaymentStore($club, $id)
 {
     $uuid = Uuid::generate();
     $uuid2 = Uuid::generate();
     $user = Auth::user();
     $club = Club::find($club);
     $event = Evento::find($id);
     $cart = Cart::contents(true);
     //Addition for stub feature
     $follow = Follower::where("user_id", "=", $user->id)->FirstOrFail();
     //check if follower equal club
     if ($follow->club_id != $club->id) {
         $param = array('ccnumber' => str_replace('_', '', Input::get('card')), 'ccexp' => sprintf('%02s', Input::get('month')) . Input::get('year'), 'cvv' => Input::get('cvv'), 'address1' => Input::get('address'), 'city' => Input::get('city'), 'state' => Input::get('state'), 'zip' => Input::get('zip'), 'discount' => Input::get('discount'), 'club' => $club->id, 'firstname' => $user->profile->firstname, 'lastname' => $user->profile->lastname, 'phone' => $user->profile->mobile);
     } else {
         $param = array('customer_vault_id' => $user->profile->customer_vault, 'discount' => Input::get('discount'), 'club' => $club->id);
     }
     $payment = new Payment();
     $transaction = $payment->sale($param);
     if ($transaction->response == 3 || $transaction->response == 2) {
         return Redirect::action('ClubPublicController@PaymentCreate', array($club->id, $event->id))->with('error', $transaction->responsetext);
     } else {
         foreach (Cart::contents() as $item) {
             $player = Player::find($item->player_id);
             $payment->id = $uuid;
             $payment->customer = $user->profile->customer_vault;
             $payment->transaction = $transaction->transactionid;
             $payment->subtotal = $transaction->subtotal;
             $payment->service_fee = $transaction->fee;
             $payment->total = $transaction->total;
             $payment->promo = $transaction->promo;
             $payment->tax = $transaction->tax;
             $payment->discount = $transaction->discount;
             $payment->club_id = $club->id;
             $payment->user_id = $user->id;
             $payment->player_id = $player->id;
             $payment->event_type = $event->type_id;
             $payment->type = $transaction->type;
             $payment->save();
             $participant = new Participant();
             $participant->id = $uuid2;
             $participant->firstname = $player->firstname;
             $participant->lastname = $player->lastname;
             $participant->due = $event->getOriginal('fee');
             $participant->early_due = $event->getOriginal('early_fee');
             $participant->early_due_deadline = $event->early_deadline;
             $participant->event_id = $item->event_id;
             $participant->player_id = $player->id;
             $participant->accepted_on = Carbon::Now();
             $participant->accepted_by = $user->profile->firstname . ' ' . $user->profile->lastname;
             $participant->accepted_user = $user->id;
             $participant->status = 1;
             $participant->method = 'full';
             $participant->save();
             $salesfee = $item->price / getenv("SV_FEE") - $item->price;
             $sale = new Item();
             $sale->description = $item->name;
             $sale->quantity = $item->quantity;
             $sale->price = $item->price;
             $sale->fee = $salesfee;
             $sale->payment_id = $uuid;
             $sale->event_id = $item->event_id;
             $sale->participant_id = $uuid2;
             $sale->save();
             if ($event->max < $event->participants->count()) {
                 //add to waitlist
                 $waitlist = new Waitlist();
                 $waitlist->id = Uuid::generate();
                 $waitlist->participant_id = $uuid2;
                 $waitlist->event_id = $event->id;
                 $waitlist->save();
                 return $waitlist;
             }
         }
         //email receipt
         $payment->receipt($transaction, $club->id, $item->player_id);
         return Redirect::action('ClubPublicController@PaymentSuccess', array($club->id, $event->id))->with('result', $transaction);
     }
 }
开发者ID:illuminate3,项目名称:league-production,代码行数:78,代码来源:ClubPublicController.php

示例11: create

 /**
  * Show the form for creating a new resource.
  * GET /calendar/create
  *
  * @return Response
  */
 public function create($id)
 {
     $event = Evento::find($id);
     $club = Club::find($event->club_id);
     return View::make('icalendar.create')->with('event', $event)->with('club', $club);
 }
开发者ID:illuminate3,项目名称:league-production,代码行数:12,代码来源:CalendarController.php

示例12: destroy

 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     $authuser = Auth::user();
     $evento = Evento::find($id);
     if ($evento) {
         $evntimgs = $evento->imagenes;
         foreach ($evntimgs as $evntimg) {
             File::delete('images/eventos/' . $evento->imagen);
         }
         File::delete('images/eventos/' . $evento->imagen);
         $evento->delete();
     }
     return Redirect::to('administracion/eventos')->with(array('usuarioimg' => $authuser->imagen, 'usuarionombre' => $authuser->nombre, 'usuarioid' => $authuser->id));
     //
 }
开发者ID:ubx-caloca,项目名称:todoconstruimos,代码行数:21,代码来源:eventosController.php

示例13: update

 /**
  * Update the specified resource in storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function update($idEvento)
 {
     $response = array();
     if (Request::ajax()) {
         $response['id'] = $idEvento;
         $response['datos'] = Input::all();
         $response['success'] = true;
         $evento = Evento::find($idEvento);
         $evento->start = Input::get('fecha_hora');
         $evento->nombre = Input::get('nombre');
         $evento->descripcion = Input::get('descripcion');
         $evento->save();
         return json_encode($response);
     }
     return array('success' => false);
 }
开发者ID:SEODiaz,项目名称:SIGA-4,代码行数:22,代码来源:EventController.php

示例14: destroy

 /**
 * Remove the specified resource from storage.
 *
 * @param  int  $id
 * @return Response
 */
 public function destroy($id)
 {
     $event = Evento::find($id);
     $status = $event->delete();
     if ($status) {
         return Redirect::action('EventoController@index');
     }
     return Redirect::action('EventoController@index')->withErrors($status);
 }
开发者ID:illuminate3,项目名称:league-production,代码行数:15,代码来源:EventoController.php

示例15: submit_upload_file

 public function submit_upload_file()
 {
     if (Auth::check()) {
         $data["inside_url"] = Config::get('app.inside_url');
         $data["user"] = Session::get('user');
         $data["permisos"] = Session::get('permisos');
         if (in_array('side_nuevo_evento', $data["permisos"])) {
             // Validate the info, create rules for the inputs
             $attributes = array('archivo' => 'Documento');
             $messages = array();
             $rules = array('archivo' => 'required|max:15360|mimes:pdf,doc,docx,xls,xlsx,ppt,pptx');
             // Run the validation rules on the inputs from the form
             $validator = Validator::make(Input::all(), $rules, $messages, $attributes);
             // If the validator fails, redirect back to the form
             $ideventos = Input::get('ideventos');
             if ($validator->fails()) {
                 return Redirect::to('eventos/upload_file/' . $ideventos)->withErrors($validator)->withInput(Input::all());
             } else {
                 if (Input::hasFile('archivo')) {
                     $archivo = Input::file('archivo');
                     $rutaDestino = 'files/eventos/';
                     $nombreArchivo = $archivo->getClientOriginalName();
                     $nombreArchivoEncriptado = Str::random(27) . '.' . pathinfo($nombreArchivo, PATHINFO_EXTENSION);
                     $peso = $archivo->getSize();
                     $uploadSuccess = $archivo->move($rutaDestino, $nombreArchivoEncriptado);
                     /* Creo el documento */
                     $documento = new Documento();
                     $documento->titulo = $nombreArchivo;
                     $documento->idtipo_documentos = 1;
                     // ¡Que viva el hardcode!
                     $documento->nombre_archivo = $nombreArchivoEncriptado;
                     $documento->ruta = $rutaDestino;
                     $documento->peso = $peso;
                     $documento->save();
                     /* Creo la relación de evento con documento */
                     $documentos_evento = new DocumentosEvento();
                     $documentos_evento->ideventos = $ideventos;
                     $documentos_evento->iddocumentos = $documento->iddocumentos;
                     $documentos_evento->save();
                     /* Envio las notificaciones via e-mail a los voluntarios */
                     $evento = Evento::find($ideventos);
                     $emails_voluntarios = Asistencia::getUsersPorEvento($evento->ideventos)->get();
                     $emails = array();
                     foreach ($emails_voluntarios as $email_voluntario) {
                         $emails[] = $email_voluntario->email;
                     }
                     Mail::send('emails.eventDocumento', array('evento' => $evento, 'documento' => $documento), function ($message) use($emails, $evento) {
                         $message->to($emails)->subject('Se subió un nuevo documento de AFI Perú.');
                     });
                     //Enviar las push notifications a los voluntarios
                     $voluntarios = Asistencia::getUserPushInfoByEvento($evento->ideventos)->get();
                     foreach ($voluntarios as $voluntario) {
                         if ($voluntario->push_documents && $voluntario->uuid) {
                             $message = 'Se subió un nuevo documento de AFI Perú.';
                             Helpers::pushAPNS($voluntario->uuid, $message, 3);
                         }
                     }
                     // Enviar las push notifications (android) a los voluntarios
                     $gcm_tokens = Asistencia::getUsersToNotificateDocumentUploaded($ideventos)->get()->lists('gcm_token');
                     $title = 'AFI Perú - Nuevo documento';
                     $message = 'Se subió un nuevo documento de AFI Perú: ' . $documento->titulo;
                     $type = 3;
                     $m = ['title' => $title, 'message' => $message, 'type' => $type];
                     Helpers::pushGCM($gcm_tokens, $m);
                     // Llamo a la función para registrar el log de auditoria
                     $descripcion_log = "Se subió el documento con id {{$documento->iddocumentos}}";
                     Helpers::registrarLog(7, $descripcion_log);
                 }
                 Session::flash('message', 'Se subió correctamente el archivo.');
                 return Redirect::to('eventos/upload_file/' . $ideventos);
             }
         } else {
             // Llamo a la función para registrar el log de auditoria
             $descripcion_log = "Se intentó acceder a la ruta '" . Request::path() . "' por el método '" . Request::method() . "'";
             Helpers::registrarLog(10, $descripcion_log);
             Session::flash('error', 'Usted no tiene permisos para realizar dicha acción.');
             return Redirect::to('/dashboard');
         }
     } else {
         return View::make('error/error');
     }
 }
开发者ID:EMerino236,项目名称:afiperularavel,代码行数:82,代码来源:EventosController.php


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