app/Http/Controllers/PeriodosController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request, $id)
    {
        $request->validate([
            'anio'=>'required'
        ]);
        $periodo = Periodos::find($id);
        $periodo->anio = $request->get('anio');
        $periodo->save();
        return redirect('admin/periodos')->with('success', 'Periodo actualizado...!');
    }
public function update ( Request $ request , $ id ) { $ request -> validate ( [ 'anio' => 'required' ] ) ; $ periodo = Periodos :: find ( $ id ) ; $ periodo -> anio = $ request -> get ( 'anio' ) ; $ periodo -> save ( ) ; return redirect ( 'admin/periodos' ) -> with ( 'success' , 'Periodo actualizado...!' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .