app/Http/Controllers/RolesController.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,[
            'name' => 'required'
        ]);
        $rol = new Role();
        $rol->name = $request->name;
        $rol->display_name = $request->display_name;
        $rol->description = $request->description;
        $rol->save();
        return redirect('home');
    }
public function store ( Request $ request ) { $ this -> validate ( $ request , [ 'name' => 'required' ] ) ; $ rol = new Role ( ) ; $ rol -> name = $ request -> name ; $ rol -> display_name = $ request -> display_name ; $ rol -> description = $ request -> description ; $ rol -> save ( ) ; return redirect ( 'home' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .