So this is not normal, right?

|
Kennygendowed 2022-04-18 17:41:26
Amit Sharma 2022-04-18 17:03:21
anyone pls support me i am facing this error

u are expected to pass a parameter but u are currently not passing any check again

Kennygendowed 2022-04-18 17:41:40
on line 191
Kennygendowed 2022-04-18 17:45:00
dilmurod_qurbonboyev 2022-04-18 16:46:44
but it does not give me authenticated user data

dd(Auth::user()->user_id)

dilmurod_qurbonboyev 2022-04-18 17:46:02
Kennygendowed 2022-04-18 17:45:00
dd(Auth::user()->user_id)

i do not have this column

dilmurod_qurbonboyev 2022-04-18 17:46:27
dilmurod_qurbonboyev 2022-04-18 16:46:32
in these routes guest can able to enter in top red line

in top red line i authenticated but user data not return null

dilmurod_qurbonboyev 2022-04-18 17:47:00
dilmurod_qurbonboyev 2022-04-18 16:45:11

there profe that i authenticated which dd works in @auth

dilmurod_qurbonboyev 2022-04-18 17:47:53
this is bag or something went wrong
dilmurod_qurbonboyev 2022-04-18 17:48:03
but i can not see
aminmaharram 2022-04-18 17:48:44
laravel_discuss-116623.jpg
Hello everyone! How can i check for existing if $variable == 1 ?

if $variable !== 1 dont check for existing data. Please help with this issue.

dilmurod_qurbonboyev 2022-04-18 17:48:44
laravel_discuss-116622.jpg
in another pages where auth::cabinet check shows name
DesolatorMagno 2022-04-18 17:49:53
aminmaharram 2022-04-18 17:48:44
Hello everyone! How can i check for existing if $variable == 1 ?

if $variable !== 1 dont check for existing data. Please help with this issue.

requiredIf

Kennygendowed 2022-04-18 17:49:57
sorry pls this is ur route file and wat u have done here is to add an auth middleware to ensure that the use is athenicated before he or she can access the route now if that is true that fine
aminmaharram 2022-04-18 17:50:13
DesolatorMagno 2022-04-18 17:49:53
requiredIf

But i want to check for exists rule

aminmaharram 2022-04-18 17:50:24
not requiredIf rule
dilmurod_qurbonboyev 2022-04-18 17:50:40
Kennygendowed 2022-04-18 17:49:57
sorry pls this is ur route file and wat u have done here is to add an auth middleware to ensure that the use is athenicated before he or she can access the route now if that is true that fine

how i display user name when he stand in main page

dilmurod_qurbonboyev 2022-04-18 17:50:54
when he authenticated

cause guest has able to stand in main page too

DesolatorMagno 2022-04-18 17:51:21
aminmaharram 2022-04-18 17:48:44
Hello everyone! How can i check for existing if $variable == 1 ?

if $variable !== 1 dont check for existing data. Please help with this issue.

You just wrote that you want to check for “existing” if variable == 1, that’s what requiredIf do.

DesolatorMagno 2022-04-18 17:52:45
Or you are talking about literal “exist”, into database?
aminmaharram 2022-04-18 17:53:14
DesolatorMagno 2022-04-18 17:52:45
Or you are talking about literal “exist”, into database?

Yes. Just run validation “exists” if $variable == 1

DesolatorMagno 2022-04-18 17:53:43
I think that for that you would need to make a custom validation, it sound to specific.
aminmaharram 2022-04-18 17:55:09
DesolatorMagno 2022-04-18 17:53:43
I think that for that you would need to make a custom validation, it sound to specific.

laravel_discuss-116635.jpg
something like this. But i need to do this shortly

DesolatorMagno 2022-04-18 17:55:43
You can move the logic inside a resquest object.
DesolatorMagno 2022-04-18 17:56:31
laravel_discuss-116637.jpg
You can also move the logic here and add the if inside the Rule exist.
DesolatorMagno 2022-04-18 17:56:47
else return true.
aminmaharram 2022-04-18 17:58:33
So this is not normal, right?)

‘ids.*’ => ‘integer’ . ($variable == 1 ? ‘|exists:course_updates,id’ : ”),

DesolatorMagno 2022-04-18 17:59:32
Is not pretty, but guess it should work.
aminmaharram 2022-04-18 18:00:21
nope, doesnt work. It still checking with validation “exists”
aminmaharram 2022-04-18 18:02:02
DesolatorMagno 2022-04-18 17:56:31
You can also move the logic here and add the if inside the Rule exist.

Okey, thank you!)

xian1017 2022-04-18 18:04:31
Flavio Valentim 2022-03-31 17:48:12
Good morning developers,
if someone can help me
when the adm changes the status of user A, there would be a way to force the user to login again

it is so easy, google it. there are so many answers in stackoverflow

husifer 2022-04-18 18:27:37
Need php expert, I need someone to solve my website scraping problem. Scraper made in php

Paid work and payment after work

Mr Chandra 2022-04-18 19:03:24
husifer 2022-04-18 18:27:37
Need php expert, I need someone to solve my website scraping problem. Scraper made in php

Paid work and payment after work

Advance payment then work

Mr Chandra 2022-04-18 19:10:12
If anyone want a good resume let me know. This is a paid service. Inbox me for design.
sandstorm111 2022-04-18 21:18:04
what’s the solution if a blade file fails to recognize a variable from the controller and keeps indicating that it’s undefined
Chandu2323 2022-04-18 21:19:45
Mr Chandra 2022-04-18 19:10:12
If anyone want a good resume let me know. This is a paid service. Inbox me for design.

Goto nova.com or canva free ok

DesolatorMagno 2022-04-18 21:29:07
sandstorm111 2022-04-18 21:18:04
what’s the solution if a blade file fails to recognize a variable from the controller and keeps indicating that it’s undefined

The view don’t have access to the variables in the controller, it only can access what the controller send to the view.

|