app/Http/Controllers/MunicipioController.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([
            'municipio' => 'required',
            'estado_id' => 'required',
        ]);
        Municipio::create($request->all());
        return Redirect::to('municipio')
       ->with('mensaje','Municipio creada satisfactoriamente.');
    }
public function store ( Request $ request ) { $ request -> validate ( [ 'municipio' => 'required' , 'estado_id' => 'required' , ] ) ; Municipio :: create ( $ request -> all ( ) ) ; return Redirect :: to ( 'municipio' ) -> with ( 'mensaje' , 'Municipio creada satisfactoriamente.' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .