Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form action="{{ route(shop.find) }}">
- <select class="form-control" name="customers1" id="customers1">
- @foreach ($customers as $key => $value)
- <option value="{{ $key }}">{{ $value }}</option>
- @endforeach
- </select>
- <select class="form-control" name="type1" id="type1">
- @foreach ($types as $key => $value)
- <option value="{{ $key }}">{{ $value }}</option>
- @endforeach
- </select>
- </form>
- public function find(Request $request){
- $customers = DB::table("tbl_customers")->pluck('name','id')->where('name', '=', $request->name);
- //This where command is absolutely wrong. I need the right ways to do it.
- $types = DB::table("tbl_types")->pluck('race','raceid')->where('race', '=', $request->race);
- return view('shop.find',compact('customers', 'types'));}
Add Comment
Please, Sign In to add comment