delete all that are checked in laravel
<p>Hello I want to delete all the rows from the database which are being checked by the user but whenever I do this I get this error <code>"Missing argument 1 for App\Http\Controllers\UploadController::deleteSelectedUploads()"</code>. I know why this error is coming because I haven't passed any id to it and if I pass any id to it then it says <code>Undefined variable: upload</code>. Please help me out. I know I have been posting a lot of questions nowadays and later solve it on my own but this is the only way of learning I guess.</p>

<h1>Controller</h1>

<pre><code> public function deleteSelectedUploads($id) {

    //$uploads = $this-&gt;upload-&gt;get($id);
    // $checkboxes = $this-&gt;request-&gt;input('checkbox[]');

    // if((Auth::user()-&gt;role=='admin')) {
    //     $this-&gt;upload-&gt;deleteUpload($id);
    // } else {
    //     Session::flash('message', "Oooopsss ... ! seems like you don't have the authority to 
    //     &lt;span style=font-weight:bold;'&gt;&lt;u&gt;DELETE&lt;/u&gt;&lt;/span&gt; this file.
    //     &lt;span style='font-size:15pt; font-weight:bold;'&gt; Contact ADMIN &lt;/span&gt;");
    //     return redirect('home');
    // }

$checkbox = Input::all();

foreach($checkbox['checkbox'] as $id) {
    Upload::where('id', $id)-&gt;delete();
}

    Session::flash('message', 'You File has been deleted');
    return redirect('home');
 }
</code></pre>

<h1>View</h1>

<pre><code>&lt;th&gt;&lt;form action="/delete-selected-uploads" method="get"&gt;

      &lt;input type="checkbox" name="checkbox" onClick="toggle(this)"/&gt;
      &lt;input type="submit" class="btn btn-block btn-success btn-xs" value="Delete all checked"&gt;
                    &lt;/form&gt;
                  &lt;/center&gt;
              &lt;/th&gt;

             &lt;td&gt;
               &lt;input type="checkbox" name="checkbox[]" id="{{ $upload['id'] }}" value="{{$upload['id']}}"&gt;
             &lt;/td&gt;
</code></pre>

<h1>Route</h1>

<pre><code>Route::get('/delete-selected-uploads', 'UploadController@deleteSelectedUploads');
</code></pre>