public function addRole(Request $request)
    {
        $user = \App\User::findOrfail($request->user_id);
        $user->assignRole($request->role_name);

        return redirect('scaffold-users/edit/'.$request->user_id);
    }
public function addRole(Request $request)
    {
        $user = \App\User::findOrfail($request->user_id);
        $user->assignRole($request->role_name);

        return redirect('scaffold-users/edit/'.$request->user_id);
    }
public function addRole ( Request $ request ) { $ user = \ App \ User :: findOrfail ( $ request -> user_id ) ; $ user -> assignRole ( $ request -> role_name ) ; return redirect ( 'scaffold-users/edit/' . $ request -> user_id ) ; }
Assign Role to user.

@param \Illuminate\Http\Request

@return \Illuminate\Http\Response
Assign Role to user .