public function excel($params) { $query = Pago::find(); $dataProvider = new ActiveDataProvider(['query' => $query, 'pagination' => array('pageSize' => 10000)]); $this->load($params); if (!$this->validate()) { // uncomment the following line if you do not want to return any records when validation fails // $query->where('0=1'); return $dataProvider; } $query->andFilterWhere(['id' => $this->id, 'forma_pago_id' => $this->forma_pago_id, 'rce_examen_id' => $this->rce_examen_id, 'monto' => $this->monto, 'comprobante' => $this->comprobante, 'estadopago' => $this->estadopago]); return $dataProvider; }
/** * Creates data provider instance with search query applied * * @param array $params * * @return ActiveDataProvider */ public function search($params) { $query = Pago::find(); $dataProvider = new ActiveDataProvider(['query' => $query]); $this->load($params); if (!$this->validate()) { // uncomment the following line if you do not want to return any records when validation fails // $query->where('0=1'); return $dataProvider; } $query->andFilterWhere(['id' => $this->id, 'fecha_registro' => $this->fecha_registro, 'fecha_pago' => $this->fecha_pago, 'medio' => $this->medio, 'valor' => $this->valor, 'estado' => $this->estado, 'academia' => $this->academia]); $query->andFilterWhere(['like', 'info', $this->info])->andFilterWhere(['like', 'comprobante', $this->comprobante]); return $dataProvider; }
/** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param int $id * @return \Illuminate\Http\Response */ public function update(PagoUpdateRequest $request, $id) { $pago = Pago::find($id); $pago->fill($request->all()); $pago->save(); Session::flash('mensaje', 'Pago modificado correctamente'); return redirect('pagos'); }
public function esValido() { $socio = Socio::find(Input::get('socios_id')); $plan = Plan::find(Input::get('planes_id')); $pagos = Pago::find(); }