K
K
kosmok2021-03-01 14:46:42
Laravel
kosmok, 2021-03-01 14:46:42

Laravel how to set multiple parameters in where (AND)?

How to select data by multiple parameters using where?

$spech_tech_options =  SpechTechOption::
                select('spech_teche_id')->
                where('value',$values)->
                where('category_spech_tech_option_id', $category_spech_tech_option_ids)->get();

this does not work
$values = [
  0 => "11ф"
  1 => "12ф"
  2 => "13ф"
]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
netrox, 2021-03-01
@kosmok

whereIn()
https://laravel.com/docs/8.x/queries#additional-wh...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question