Can anyone tell me what to do?

|
RahiMSuleymaN 2021-02-01 14:19:00
but I get error
RahiMSuleymaN 2021-02-01 14:19:21
laravel_discuss-68786.jpg

RahiMSuleymaN 2021-02-01 14:20:45
Batu157 2021-02-01 14:15:59
You can do this:

Model::whereIn(‘field_to_check’, [1, 2, 3….])

I get sam e error

RahiMSuleymaN 2021-02-01 14:20:56
same error
Batu157 2021-02-01 14:22:01
RahiMSuleymaN 2021-02-01 14:18:38

There is whereBetween not whereIn

Batu157 2021-02-01 14:22:34
Can you show DD($ideas)?
RahiMSuleymaN 2021-02-01 14:22:41
Batu157 2021-02-01 14:22:01
There is whereBetween not whereIn

I tested them of both

RahiMSuleymaN 2021-02-01 14:22:51
laravel_discuss-68792.jpg

RahiMSuleymaN 2021-02-01 14:23:04
it`s result of explode
RahiMSuleymaN 2021-02-01 14:24:54
laravel_discuss-68794.jpg

RahiMSuleymaN 2021-02-01 14:25:11
laravel_discuss-68795.jpg

Batu157 2021-02-01 14:26:00
You’re missing a get statement
Batu157 2021-02-01 14:26:21
Idea:: wherein (…)->get();
Batu157 2021-02-01 14:31:54
Did it work?
RahiMSuleymaN 2021-02-01 14:33:20
yeah
DesolatorMagno 2021-02-01 15:07:16
Idea::find([1,2,’third’,4])
RahiMSuleymaN 2021-02-01 15:12:23
In Laravel, I have to enter 5 rows of data in table a (will be included to 2 columns) . Column 1 will receive a fixed value (for example, 5). I have an array like [‘a’, ‘b’, ‘c’, ‘d’, ‘e’] to include in the 2nd column. How can I include data in the table without using loop
DesolatorMagno 2021-02-01 15:13:16
Insert.
Prem Soni 2021-02-01 15:14:11
laravel_discuss-68805.jpg

Prem Soni 2021-02-01 15:14:22
can anyone tell me what to do?
sbruder 2021-02-01 15:21:03
Prem

$a = [‘a’,’b’,’c’,’d’,’e’];
$rows = array_map(fn($e) => [$e, 5], $a);
TableA::insert($rows)

Prem Soni 2021-02-01 15:23:40
can anyone help me?
sbruder 2021-02-01 15:24:21
Prem Soni 2021-02-01 15:23:40
can anyone help me?

I just pasted an example right above

Prem Soni 2021-02-01 15:24:38
not about that
Prem Soni 2021-02-01 15:24:49
about the image I send
Prem Soni 2021-02-01 15:25:16
I need to install laravel maddhatter package but it is showing me error
dhenish 2021-02-01 15:26:05
Anyone know how to us imperial convert to Metric you know plz tell me how to convert …
RahiMSuleymaN 2021-02-01 15:27:27
sbruder 2021-02-01 15:21:03
Prem

$a = [‘a’,’b’,’c’,’d’,’e’];
$rows = array_map(fn($e) => [$e, 5], $a);
TableA::insert($rows)

Arrow function syntax is available in PHP 7.4 only

sbruder 2021-02-01 15:27:28
Prem that package is requiring a illuminate/support too old for laravel8.
Prem Soni 2021-02-01 15:27:46
so what to do
sbruder 2021-02-01 15:28:14
get a newer version, update yourself if its not available or downgrade your laravel.
Prem Soni 2021-02-01 15:28:25
can you tell me how to update it
sbruder 2021-02-01 15:29:02
that’s really beyond of scope of a simple “help me” in a laravel forum 🙂
Prem Soni 2021-02-01 15:29:26
hm
RahiMSuleymaN 2021-02-01 15:32:48
sbruder 2021-02-01 15:21:03
Prem

$a = [‘a’,’b’,’c’,’d’,’e’];
$rows = array_map(fn($e) => [$e, 5], $a);
TableA::insert($rows)

thanks for help

|