app/Http/Controllers/CancerController.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)
    {
        $cancer= new cancer();
        $cancer->nombre=ucfirst(trans($request->cancer));
        $cancer->save();
        $user = new User();
        event(new UserEvent($user, 'Agregar tipo cáncer'));
        flash('Se ha registrado '. $cancer->nombre . ' de forma exitosa')->success()->important();
        return redirect()->route('cancer.index');
    }
public function store ( Request $ request ) { $ cancer = new cancer ( ) ; $ cancer -> nombre = ucfirst ( trans ( $ request -> cancer ) ) ; $ cancer -> save ( ) ; $ user = new User ( ) ; event ( new UserEvent ( $ user , 'Agregar tipo cáncer') ) ; flash ( 'Se ha registrado ' . $ cancer -> nombre . ' de forma exitosa' ) -> success ( ) -> important ( ) ; return redirect ( ) -> route ( 'cancer.index' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .