app/Http/Controllers/Admin/UsersController.php
/**
     * Show the form for editing the specified resource.
     *
     * @param  \App\User  $user
     * @return \Illuminate\Http\Response
     */
Show the form for editing the specified resource.
Show the form for editing the specified resource .
public function edit(User $user)
    {
        if (Gate::denies('edit-users')) {
            return redirect(route('admin.users.index'));
        }
        $roles = Role::all();
        return view('admin.users.edit')->with([
            'user' => $user,
            'roles' => $roles
        ]);
    }
public function edit ( User $ user ) { if ( Gate :: denies ( 'edit-users' ) ) { return redirect ( route ( 'admin.users.index' ) ) ; } $ roles = Role :: all ( ) ; return view ( 'admin.users.edit' ) -> with ( [ 'user' => $ user , 'roles' => $ roles ] ) ; }
Show the form for editing the specified resource.
Show the form for editing the specified resource .