app/Http/Controllers/CarrerasController.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)
    {
        $this->validate($request, [
            'nombre' => 'required|unique:carreras',
        ]);
        carreras::create($request->all());
        return redirect()->route('carreras.index');
    }
public function store ( Request $ request ) { $ this -> validate ( $ request , [ 'nombre' => 'required|unique:carreras' , ] ) ; carreras :: create ( $ request -> all ( ) ) ; return redirect ( ) -> route ( 'carreras.index' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .