public function edit(User $user)
    {
        $roles         = $this->getAllowedRoles();
        $selectedRoles = $user->roles()->pluck('roles.id');

        return view('administrator.users.edit', compact('user', 'roles', 'selectedRoles'));
    }
public function edit(User $user)
    {
        $roles         = $this->getAllowedRoles();
        $selectedRoles = $user->roles()->pluck('roles.id');

        return view('administrator.users.edit', compact('user', 'roles', 'selectedRoles'));
    }
public function edit ( User $ user ) { $ roles = $ this -> getAllowedRoles ( ) ; $ selectedRoles = $ user -> roles ( ) -> pluck ( 'roles.id' ) ; return view ( 'administrator.users.edit' , compact ( 'user' , 'roles' , 'selectedRoles' ) ) ; }
Show and edit selected user.

@param \App\User $user
@return \Illuminate\View\View
Show and edit selected user .