本文整理汇总了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));
}
}
示例2: directConsume
public function directConsume()
{
if (!$this->validation->passes(ConsumeValidator::$directConsumeRule)) {
throw new PayException(ErrCode::ERR_PARAM);
}
return ConsumeBiz::getInstance()->directConsume(\Input::All());
}
示例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 );
}
}
示例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]);
}
示例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');
}
示例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');
}
}
示例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));
}
示例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);
}
}
示例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']);
}
}
示例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'));
}
示例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));
}
}
示例12: postBoxagente
public function postBoxagente()
{
$input = Input::All();
$idAgente = $input['idAgente'];
$agente = Agente::find($idAgente);
$agente->localidad->provincia;
return $agente->toJson();
}
示例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();
}
}
示例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));
}
}
示例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));
}
}