app/Http/Controllers/RoleController.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)
    {
        $role = new Role();
        $role->name = request('name');
        $role->save();
        return redirect('roles');
    }
public function store ( Request $ request ) { $ role = new Role ( ) ; $ role -> name = request ( 'name' ) ; $ role -> save ( ) ; return redirect ( 'roles' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .