-1

I have a table in it there are checkboxes I need that on those users on which the checkbox is selected their id was transferred

my form

<input type="submit" form="qwe">
 <form action="{{URL::to('othet_nn')}}" method="get" id="qwe">
                 <input type="checkbox" name="id">
             </form>

my controller

public function chek(){
        dd($_GET);
        return view('admin.pages.othet_test');
    }

I need to be passed the id of those users who had a check mark in the checkbox

Marcin Nabiałek
  • 109,655
  • 42
  • 258
  • 291
QIPS
  • 1
  • 4

2 Answers2

1

you can use this like

 <form action="{{URL::to('othet_nn')}}" method="post" id="qwe">
                 <input type="checkbox" name="id" value="1">
             </form>
public function check(Request $request){
        dd($request->id);
        return view('admin.pages.othet_test');
    }
Tanvir Ahmed
  • 969
  • 12
  • 24
0

In Laravel you should use Request class. To see the whole input you can use:

request()->all()

and to get individual field you can use

request()->input('id')

I advise you to read documentation about requests

Marcin Nabiałek
  • 109,655
  • 42
  • 258
  • 291