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


PHP Input::All方法代码示例

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


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

示例1: update

 /**
  * Update the specified resource in storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function update($id)
 {
     $golongan = Golongan::find($id);
     if ($golongan->update(Input::All())) {
         return Response::json(array('success' => TRUE));
     }
 }
开发者ID:shinichi81,项目名称:angular-simpeg,代码行数:13,代码来源:GolonganController.php

示例2: directConsume

 public function directConsume()
 {
     if (!$this->validation->passes(ConsumeValidator::$directConsumeRule)) {
         throw new PayException(ErrCode::ERR_PARAM);
     }
     return ConsumeBiz::getInstance()->directConsume(\Input::All());
 }
开发者ID:yellowriver,项目名称:pay,代码行数:7,代码来源:ConsumeController.class.php

示例3: populateForm

 protected function populateForm($model = false)
 {
     //dd($model);
     if ($model) {
         $address = $model->address;
         $venues = $model->venues;
         $companies = $model->companies;
         Former::populate($model);
         Former::populate($model, $model->address);
     } else {
         $address = [];
         $input = Input::All();
         Former::populate($input);
         Former::populateField('address.email', $input['address']['email']);
         Former::populateField('address.phone', $input['address']['phone']);
         Former::populateField('address.country.name', $input['country']);
         Former::populateField('address.address', $input['address']['address']);
         Former::populateField('address.postal_code', $input['address']['postal_code']);
         Former::populateField('address.city', $input['address']['city']);
         Former::populateField('address.state_province', $input['address']['state_province']);
         Former::populateField('address.fax', $input['address']['fax']);
         Former::populateField('address.website', $input['address']['website']);
         //Former::populate( $input, $input );
     }
 }
开发者ID:strikles,项目名称:php,代码行数:25,代码来源:ContactsController.php

示例4: postDelete

 /**
  * Remove the specified company from storage.
  *
  * @param $company
  * @return Response
  */
 public function postDelete($model)
 {
     // Declare the rules for the form validation
     $rules = array('id' => 'required|integer');
     // Validate the inputs
     $validator = Validator::make(Input::All(), $rules);
     // Check if the form validates with success
     if ($validator->passes()) {
         $id = $model->id;
         $model->delete();
         $file_path = public_path() . '/uploads/' . $model->filename;
         $file_ok = true;
         if (File::exists($file_path)) {
             $file_ok = false;
             File::delete($file_path);
             if (!File::exists($file_path)) {
                 $file_ok = true;
             }
         }
         // Was the blog post deleted?
         $Model = $this->modelName;
         $model = $Model::find($id);
         if (empty($model) && $file_ok) {
             // Redirect to the blog posts management page
             return Response::json(['success' => 'success', 'reload' => true]);
         }
     }
     // There was a problem deleting the blog post
     return Response::json(['error' => 'error', 'reload' => false]);
 }
开发者ID:strikles,项目名称:php,代码行数:36,代码来源:PicturesController.php

示例5: refundStore

 public function refundStore()
 {
     $input = Input::all();
     $v = Validator::make(Input::All(), array('houseID' => 'required', 'tenant' => 'required', 'type' => 'required', 'rentD' => 'required', 'waterD' => 'required', 'electricityD' => 'required', 'grepairs' => 'required', 'Obills' => 'required', 'Tcost' => 'required', 'Sfees' => 'required', 'duedate' => 'required'));
     if ($v->passes()) {
         $balance = Input::get('rentD') + Input::get('waterD') + Input::get('grepairs') + Input::get('Obills') + Input::get('Tcost') + Input::get('Sfees') + Input::get('electricityD');
         $invoice = new Invoice();
         $invoice->type = Input::get('type');
         $invoice->houseID = Input::get('houseID');
         $invoice->recipient = Input::get('tenant');
         $invoice->balance = $balance;
         $invoice->duedate = Input::get('duedate');
         $invoice->save();
         $invoicedetail = new Invoicedetail();
         $invoicedetail->rentD = Input::get('rentD');
         $invoicedetail->waterD = Input::get('waterD');
         $invoicedetail->g_repairs = Input::get('grepairs');
         $invoicedetail->o_bills = Input::get('Obills');
         $invoicedetail->transport_cost = Input::get('Tcost');
         $invoicedetail->storage_fees = Input::get('Sfees');
         $invoicedetail->electricityD = Input::get('electricityD');
         $invoice->invoicedetail()->save($invoicedetail);
         return Redirect::intended('admin/invoice');
     }
     return Redirect::back()->withInput()->withErrors($v)->with('message', 'There were validation errors');
 }
开发者ID:jeremiteki,项目名称:mteja,代码行数:26,代码来源:BillController.php

示例6: NuevaTarea

 public function NuevaTarea()
 {
     $enviado = Input::get('enviado');
     if (isset($enviado)) {
         $rules = $this->getRulesNuevaTarea();
         $messages = $this->getMensajesNuevaTarea();
         $validator = Validator::make(Input::All(), $rules, $messages);
         if ($validator->passes()) {
             $insert = $this->InsertarTarea(Input::all());
             if ($insert === 1) {
                 $mensaje = 'Tarea Creada con Éxito';
                 $visible = false;
             } else {
             }
             return Redirect::route('listatareas')->withInput(Input::flash());
         } else {
             Session::flash('visibleNuevo', TRUE);
             return Redirect::route('listatareas')->withInput(Input::flash())->withErrors($validator);
         }
     } else {
         Session::flash('mensajeError', $mensajeError);
         Session::flash('visibleNuevo', TRUE);
         return Redirect::route('listatareas');
     }
 }
开发者ID:miguelcamargo9,项目名称:dactool,代码行数:25,代码来源:TareasController.php

示例7: recommendationsUpload

 public function recommendationsUpload()
 {
     $recommendation = new Recommendation();
     $active_principle = new ActivePrinciple();
     $columns = $recommendation->columns();
     $foreign_key = array_pop($columns);
     // retrieve FK column
     $input = Input::All();
     $header = array_shift($input);
     // retrieve header row
     if (!$this->checkHeader($header, $columns)) {
         return Response::json(array("success" => false, "info" => "Cabeceras del Excel no coincide con la base de datos.\n                    No se procederá a modificar la base de datos."));
     }
     DB::table($recommendation->getTableName())->delete();
     try {
         $errors = "";
         foreach ($input as $row) {
             $row = $this->readRow($row, $header);
             $recommendation = new Recommendation($row);
             $active_principle_found = DB::table($active_principle->getTableName())->select("id", "principio_activo")->where("principio_activo", "=", $recommendation->principio_activo)->first();
             if ($active_principle_found != NULL) {
                 $recommendation->active_principle_id = $active_principle_found->id;
                 $recommendation->save();
             } else {
                 $errors .= "\nRecomendación para un principio activo: " . $active_principle->principio_activo . " inexistente";
             }
         }
     } catch (Exception $ex) {
         return Response::json(array("success" => false, "info" => "Ha habido algún problema cargando el Excel en la base de datos." . "\n" . $ex->getMessage()));
     }
     return Response::json(array("success" => true, "info" => "Se ha cargado el excel en la base de datos correctamente.", "errors" => $errors));
 }
开发者ID:polo070770,项目名称:TFG,代码行数:32,代码来源:BBDDController.php

示例8: postModificar

 public function postModificar()
 {
     $input = Input::All();
     $validacion = Validator::make(Input::All(), array('razon_social' => 'required', 'nombre_fantasia' => 'required', 'domicilio' => 'required'));
     if (!$validacion->fails()) {
         $agente = Agente::find($input['id']);
         if ($agente != null) {
             $agente->estado_logico = $input['estado'];
             $agente->razon_social = $input['razon_social'];
             $agente->nombre_fantasia = $input['nombre_fantasia'];
             $agente->domicilio = $input['domicilio'];
             $agente->id_localidad = $input['localidad'];
             $agente->save();
             $usuario = $agente->usuario();
             $usuario->email = $input['email'];
             if ($input['password'] != '' && $input['password'] == $input['repassword']) {
                 $usuario->password = $input['password'];
             }
             $usuario->save();
             return Redirect::to('panel_administrador/abm_agente');
         } else {
             return Redirect::action('AbmAgenteController@getIndex');
         }
     } else {
         return Redirect::back()->withErrors($validacion);
     }
 }
开发者ID:noyamn,项目名称:GOA,代码行数:27,代码来源:AbmAgenteController.php

示例9: save

 public function save($title)
 {
     if ($title == "siteSettings") {
         $settingsData = Input::All();
         while (list($key, $value) = each($settingsData)) {
             $settings = settings::where('fieldName', $key)->first();
             if ($key == "activatedModules") {
                 $settings->fieldValue = json_encode($value);
             } elseif ($key == "officialVacationDay") {
                 $settings->fieldValue = json_encode($value);
             } elseif ($key == "daysWeekOff") {
                 $settings->fieldValue = json_encode($value);
             } elseif ($key == "smsProvider") {
                 $settings->fieldValue = json_encode($value);
             } elseif ($key == "mailProvider") {
                 $settings->fieldValue = json_encode($value);
             } else {
                 $settings->fieldValue = $value;
             }
             $settings->save();
         }
         return $this->panelInit->apiOutput(true, $this->panelInit->language['editSettings'], $this->panelInit->language['settSaved']);
     }
     if ($title == "terms") {
         $settings = settings::where('fieldName', 'schoolTerms')->first();
         $settings->fieldValue = htmlspecialchars(Input::get('fieldValue'), ENT_QUOTES);
         $settings->save();
         return $this->panelInit->apiOutput(true, $this->panelInit->language['editSettings'], $this->panelInit->language['settSaved']);
     }
 }
开发者ID:schoex,项目名称:Campusmate,代码行数:30,代码来源:SiteSettingsController.php

示例10: postConsulta

 public function postConsulta()
 {
     $input = Input::All();
     $incidencias = Incidencia::Where('id_estado', '=', 3)->Where('codigo', 'like', $input['nro_incidencia'] . '%')->WhereHas('agente', function ($agente) use($input) {
         $agente->where('nombre_fantasia', 'like', $input['nombre_fantasia'] . '%');
     })->get();
     return $this->layout->content = View::make('operador.Incidencia_consulta', compact('incidencias'));
 }
开发者ID:noyamn,项目名称:host,代码行数:8,代码来源:IncidenciaController.php

示例11: update

 /**
  * Update the specified resource in storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function update($id)
 {
     //
     $jabatan = Jabatan::find($id);
     if ($jabatan->update(Input::All())) {
         return Response::json(array('success' => TRUE));
     }
 }
开发者ID:shinichi81,项目名称:angular-simpeg,代码行数:14,代码来源:JabatanController.php

示例12: postBoxagente

 public function postBoxagente()
 {
     $input = Input::All();
     $idAgente = $input['idAgente'];
     $agente = Agente::find($idAgente);
     $agente->localidad->provincia;
     return $agente->toJson();
 }
开发者ID:noyamn,项目名称:GOA,代码行数:8,代码来源:AjaxController.php

示例13: checkSign

 public function checkSign()
 {
     $fields = \Input::All();
     if (!\Input::has('sign') || true !== SignUtil::checkSign($fields)) {
         $this->ret['err_code'] = ErrCode::ERR_SIGN_ERROR;
         return $this->render();
     }
 }
开发者ID:yellowriver,项目名称:pay,代码行数:8,代码来源:CommonFilterController.class.php

示例14: update

 /**
  * Update the specified resource in storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function update($id)
 {
     //
     $ppk = Ppk::find($id);
     if ($ppk->update(Input::All())) {
         return Response::json(array('success' => TRUE));
     }
 }
开发者ID:shinichi81,项目名称:angular-simpeg,代码行数:14,代码来源:PpkController.php

示例15: update

 /**
  * Update the specified resource in storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function update($id)
 {
     //
     $satuankerja = SatuanKerja::find($id);
     if ($satuankerja->update(Input::All())) {
         return Response::json(array('success' => TRUE));
     }
 }
开发者ID:shinichi81,项目名称:angular-simpeg,代码行数:14,代码来源:SatuanKerjaController.php


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