Stack Exchange
log in
users (9)
rooms (12)
faq
Udhayan Nair
general
recent
conversations
Discussion between Andrew and Udhayan
…
Imported from a comment discussion on
stackoverflow.com/questi...
Udhayan Nair
Oct 18, 2019 10:21
umm im about to leave my office now as it is 930 pm where i am, so i wanna grab a beer and crash, maybe later on email i can help you out
Udhayan Nair
Oct 18, 2019 10:20
err no you need a separate query for that
Udhayan Nair
Oct 18, 2019 10:18
cheers no worries!
Udhayan Nair
Oct 18, 2019 10:17
as your view isnt present on the question
Udhayan Nair
Oct 18, 2019 10:17
that answer should not be written, as it is not relevant to the question you posted XD
Udhayan Nair
Oct 18, 2019 10:17
if you got any other question, just email me @
[email protected]
Udhayan Nair
Oct 18, 2019 10:16
anyways im going home now
Udhayan Nair
Oct 18, 2019 10:16
no worries
Udhayan Nair
Oct 18, 2019 10:15
so it works?
Udhayan Nair
Oct 18, 2019 10:14
yeap!
Udhayan Nair
Oct 18, 2019 10:13
ye
Udhayan Nair
Oct 18, 2019 10:11
@if($user->id == $p->user_id)
{{ $p->city }}
@endif
Udhayan Nair
Oct 18, 2019 10:11
use
Udhayan Nair
Oct 18, 2019 10:09
no dont delete the foreach, filter what you need properly
Udhayan Nair
Oct 18, 2019 10:09
no worries
Udhayan Nair
Oct 18, 2019 10:04
thats a lot of loops, you need to cancel your looping xD
Udhayan Nair
Oct 18, 2019 10:03
yea you could do that
Udhayan Nair
Oct 18, 2019 10:02
you can do that in your controller as well
Udhayan Nair
Oct 18, 2019 10:02
$private = (array) $private;
Udhayan Nair
Oct 18, 2019 10:02
that is one way
Udhayan Nair
Oct 18, 2019 10:02
ahhh
Udhayan Nair
Oct 18, 2019 10:00
WAT
Udhayan Nair
Oct 18, 2019 10:00
what is line 550
Udhayan Nair
Oct 18, 2019 09:58
basically
Udhayan Nair
Oct 18, 2019 09:58
and loop it like @foreach($users as $user)@foreach($private as $p) @if($p['user_id'] == $user['id'] @if($p['city'] == 1) show else hide
Udhayan Nair
Oct 18, 2019 09:57
so pass $private to your view
Udhayan Nair
Oct 18, 2019 09:57
yeah you definitely can use this
Udhayan Nair
Oct 18, 2019 09:55
yea, so you do get the values, then there should not be any issues Oo
Udhayan Nair
Oct 18, 2019 09:54
what do you get
Udhayan Nair
Oct 18, 2019 09:54
dd($temparr) in your view
Udhayan Nair
Oct 18, 2019 09:54
and dd in the view
Udhayan Nair
Oct 18, 2019 09:54
dont use get()
Udhayan Nair
Oct 18, 2019 09:52
huh
Udhayan Nair
Oct 18, 2019 09:50
oh yeah, its supposed to work like that, cause this is your search function, so if you dont search, it does not inject your $users withoout a get()
Udhayan Nair
Oct 18, 2019 09:48
so it stopped working after the loop solution or the query i passed to you
Udhayan Nair
Oct 18, 2019 09:47
so the search was working before? do you ahve the function for the search?
Udhayan Nair
Oct 18, 2019 09:46
ok what's the issue with the thing we are discussing now
Udhayan Nair
Oct 18, 2019 09:45
wot
Udhayan Nair
Oct 18, 2019 09:44
then what's the issue now hahah
Udhayan Nair
Oct 18, 2019 09:44
so it is there
Udhayan Nair
Oct 18, 2019 09:44
dd temparr in your view
Udhayan Nair
Oct 18, 2019 09:44
neither, the data is there
Udhayan Nair
Oct 18, 2019 09:44
ok so it is responding the data
Udhayan Nair
Oct 18, 2019 09:42
voiew
Udhayan Nair
Oct 18, 2019 09:42
what do you get
Udhayan Nair
Oct 18, 2019 09:42
ok in the view, dd(users)
Udhayan Nair
Oct 18, 2019 09:41
that loop shouldnt matter
Udhayan Nair
Oct 18, 2019 09:41
you have to use users as user
Udhayan Nair
Oct 18, 2019 09:41
you cant user user as user
Udhayan Nair
Oct 18, 2019 09:40
this is confusing