app/Http/Controllers/IndicadoresController.php
/**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
Store a newly created resource in storage.
Store a newly created resource in storage .
public function store(Request $request)
    {
        $request->validate([
            'descripcion'=>'required',
            'eje_id'=>'required',
        ]);
        $indicador = new Indicadores();
        $indicador->descripcion = $request->get('descripcion');
        $indicador->eje_id = $request->get('eje_id');
        $indicador->save();
        return redirect('admin/indicadores')->with('success', 'Indicador creada...!');
    }
public function store ( Request $ request ) { $ request -> validate ( [ 'descripcion' => 'required' , 'eje_id' => 'required' , ] ) ; $ indicador = new Indicadores ( ) ; $ indicador -> descripcion = $ request -> get ( 'descripcion' ) ; $ indicador -> eje_id = $ request -> get ( 'eje_id' ) ; $ indicador -> save ( ) ; return redirect ( 'admin/indicadores' ) -> with ( 'success' , 'Indicador creada...!' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .