title: The email has already been taken
body: <p>I'm going to edit a row using <code>form request validate laravel</code>, but when editing if I do not change the email, <code>The email has already been taken error.</code> Gives</p>
  <p>this is from request validate <code>EditAdmin</code></p>
  <pre><code>&lt;?php
  
  namespace App\Http\Requests;
  
  use Illuminate\Foundation\Http\FormRequest;
  use Illuminate\Validation\Rules;
  use Illuminate\Validation\Rule;
  class EditAdmin extends FormRequest
  {
      /**
       * Determine if the user is authorized to make this request.
       *
       * @return bool
       */
      public function authorize()
      {
          return true;
      }
  
      /**
       * Get the validation rules that apply to the request.
       *
       * @return array
       */
      public function rules()
      {
          return [
              'name' =&gt; ['required', 'string'],
              'email' =&gt; ['required', 'string', 'email', Rule::unique('admins')],
              'password' =&gt; ['required', 'confirmed', Rules\Password::defaults()],
          ];
      }
  }
  </code></pre>
  <p>this my controller <code>AdminController</code></p>
  <pre><code>&lt;?php
  
  namespace App\Http\Controllers;
  
  use App\Repositories\AdminRepository;
  use App\Http\Requests\CreateAdmin;
  use App\Interfaces\AdminInterface;
  use App\Http\Requests\EditAdmin;
  use Illuminate\Validation\Rules;
  use Illuminate\Validation\Rule;
  use Illuminate\Http\Request;
  use App\Models\Admin;
  
  class AdminController extends Controller
  {
      /**
       * admin Service Interface
       * @var AdminRepository
       */
      protected $admin;
  
      /**
       * Inject service By Service Container
       * @param AdminRepository $admin
       */
      public function __construct(AdminRepository $admin)
      {
          $this-&gt;admin = $admin;
      }
  
      /**
       * Show All Admins
       * Method:get
       * Return get All admin
       * @return \Illuminate\Contracts\View\View
       */
      public function getAllAdmin():\Illuminate\Contracts\View\View
      {
          $admins = $this-&gt;admin-&gt;getAllAdmin();
          return view('admin.list',['admins'=&gt;$admins]);
      }
  
      /**
       * param:Admin_id
       * method delete
       * Delete admin
       * @param int $id
       * @return \Illuminate\Http\RedirectResponse
       */
      public function deleteAdmin(int $id):\Illuminate\Http\RedirectResponse
      {
          $this-&gt;admin-&gt;deleteAdmin($id);
          return redirect('/admins');
      }
  
      /**
       * get single admin
       * method get
       * @param $id
       * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View
       */
      public function getAdmin(int $id):\Illuminate\Contracts\View\View
      {
          $admin = $this-&gt;admin-&gt;getAdmin($id);
          return view('admin.edit',['admin'=&gt;$admin]);
      }
  
      /**
       * Updated Admin
       * Route:Api/Nft/$nft_id
       * Method:Put
       * @param Request $request
       * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
       */
      public function editAdmin(EditAdmin $request):\Illuminate\Http\RedirectResponse
      {
          $request-&gt;validated();
          //validate all input
          // $request-&gt;validate([
          //     'name' =&gt; ['required', 'string'],
          //     'email' =&gt; ['required', 'string', 'email', Rule::unique('admins')-&gt;ignore($request-&gt;id),],
          //     'password' =&gt; ['required', 'confirmed', Rules\Password::defaults()],
          // ]);
          $data = $request-&gt;all();
          $this-&gt;admin-&gt;editAdmin($data);
          return redirect('/admins');
      }
  
      /**
       * create new admin
       * @param CreateAdmin $request
       * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
       */
      public function createAdmin(CreateAdmin $request):\Illuminate\Http\RedirectResponse
      {
          $request-&gt;validated();
          $data = $request-&gt;all();
          $this-&gt;admin-&gt;createAdmin($data);
          return redirect('/admins');
      }
  }
  </code></pre>
  <p>How can I fix this bug?
  pleas help me!!!</p>