title: copy data from one table to another table and also delete data from main table with one button in laravel
body: <p>i have an admin table in my laravel project.i want to add admin's data in another table and delete it when i click on remove button</p>
  <p>this my admin controller</p>
  <pre><code> public function remove(Request $request,Admin $admin)
  {
      Deletedadmin::create([
          'first_name'=&gt;$request['first_name'],
          'last_name'=&gt;$request['last_name'],
          'username'=&gt;$request['username'],
          'email'=&gt;$request['email'],
          'mobile'=&gt;$request['mobile'],
          'age'=&gt;$request['age'],
          'password'=&gt;0,
      ]);
      return redirect()-&gt;route('admin.index');
  
  }
  </code></pre>
  <p>this my admin index code</p>
  <pre><code>&lt;div class=&quot;text-center mb-1&quot;&gt;
                                      &lt;form action=&quot;{{route('admin.remove',['admin'=&gt;$admin-&gt;id])}}&quot; method=&quot;POST&quot;&gt;
                                          @csrf
                                          &lt;input class=&quot;form-control&quot; type=&quot;hidden&quot; placeholder=&quot;First Name&quot;
                                                 name=&quot;first_name&quot; value=&quot;{{$admin-&gt;first_name}}&quot;&gt;
                                          &lt;input class=&quot;form-control&quot; type=&quot;hidden&quot; placeholder=&quot;Last Name&quot;
                                                 name=&quot;last_name&quot;value=&quot;{{$admin-&gt;last_name}}&quot;&gt;
                                          &lt;input class=&quot;form-control&quot; type=&quot;hidden&quot; placeholder=&quot;Username&quot;
                                                 name=&quot;username&quot;value=&quot;{{$admin-&gt;username}}&quot;&gt;
                                          &lt;input class=&quot;form-control&quot; type=&quot;hidden&quot; placeholder=&quot;Email&quot;
                                                 name=&quot;email&quot;value=&quot;{{$admin-&gt;email}}&quot;&gt;
                                          &lt;input class=&quot;form-control&quot; type=&quot;hidden&quot; placeholder=&quot;Mobile&quot;
                                                 name=&quot;mobile&quot;value=&quot;{{$admin-&gt;mobile}}&quot;&gt;
                                          &lt;input class=&quot;form-control&quot; type=&quot;hidden&quot; placeholder=&quot;Age&quot; name=&quot;age&quot;value=&quot;{{$admin-&gt;age}}&quot;&gt;
  
                                          &lt;input class=&quot;btn btn-sm btn-warning&quot; type=&quot;submit&quot; value=&quot;Remove&quot;name=&quot;remove_admin&quot;&gt;
                                      &lt;/form&gt;
                                  &lt;/div&gt;
  </code></pre>
  <p>i have seted my input type to hidden to not shown in my admin list
  and when i click on submit button it copy the inputs data from this table to <strong>removedadmin</strong> table</p>
  <p>now i want to know what can i do to first copy the data from admin to deletedadmins table then remove it from admin table</p>
  <p>i know how to do these actions seperately but i want to know can create and delete with on button ??</p>