當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。