app/Http/Controllers/AsignaturaController.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([
            'nombre'=>'required',
        ]);
        $asignatura = new Asignaturas();
        $asignatura->nombre = $request->get('nombre');
        $asignatura->save();
        return redirect('admin/asignaturas')->with('success', 'Asignatura creada...!');
    }
public function store ( Request $ request ) { $ request -> validate ( [ 'nombre' => 'required' , ] ) ; $ asignatura = new Asignaturas ( ) ; $ asignatura -> nombre = $ request -> get ( 'nombre' ) ; $ asignatura -> save ( ) ; return redirect ( 'admin/asignaturas' ) -> with ( 'success' , 'Asignatura creada...!' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .