Laravel 2021-01-09 23:16

|
2021-01-09 23:16:00
laravel_discuss-66101.jpg
hi guys how can i get users real ip adress i tried like this its giving my public ip in localhost but when i upload my project to heroku its giving anyother ip USA
limusina10 2021-01-09 23:59:29
2021-01-09 23:16:00
hi guys how can i get users real ip adress i tried like this its giving my public ip in localhost but when i upload my project to heroku its giving anyother ip USA

I think $_SERVER[‘REMOTE_ADDR’] has the value you are searching for

Siberfx 2021-01-10 00:38:01
🙂 the old way ?
2021-01-10 00:40:41
limusina10 2021-01-09 23:59:29
I think $_SERVER[‘REMOTE_ADDR’] has the value you are searching for

I did it like request::ip(); but its giving wrong IP on hosting

nazmulpcc 2021-01-10 01:05:16
Heroku probably doesn’t serve your content directly, it probably goes through some reverse proxy, load balancers etc. So when the traffic reaches your application, some other host is acting as a client and you are getting that ip
2021-01-10 01:09:41
nazmulpcc 2021-01-10 01:05:16
Heroku probably doesn’t serve your content directly, it probably goes through some reverse proxy, load balancers etc. So when the traffic reaches your application, some other host is acting as a client and you are getting that ip

yup maybe because when my friend tried to check his ip it was same ip which i had

nazmulpcc 2021-01-10 01:18:58
You can check $_SERVER[‘HTTP_X_FORWARDED_FOR’]
this might have what you are looking for
2021-01-10 01:29:35
nazmulpcc 2021-01-10 01:18:58
You can check $_SERVER[‘HTTP_X_FORWARDED_FOR’]
this might have what you are looking for

tnx sir I’ll try

limusina10 2021-01-10 02:10:38
Siberfx 2021-01-10 00:38:01
🙂 the old way ?

Always works

2021-01-10 03:48:20
Hey guys iam facing an issue with my website hosted in godaddy…

So a couple of days ago i deployed laravel project in cpanel it was working fine .
Today it is giving me error

PHP Fatal error: Interface ‘JsonSerializable’ not found in

2021-01-10 04:25:54
Hey guys how do i change the value of

$_SERVER[‘REDIRECT_SCRIPT_URI’]

And

$_SERVER[‘SCRIPT_URI’]

Relaxed Guy 2021-01-10 08:43:46
<input type=”range” class=”form-range float-left mt-4″ min=”0″ max=”10″ step=”1″ id=”score” name=”score” onChange=”change();”/>
<label class=”float-left badge badge-primary” for=”r”>4</label>
<a class=”badge badge-primary float-left mt-4″
href=”/add/score”
onclick=”event.preventDefault();
document.getElementById(‘score-form’).submit();”
>Add Score</a>
<form id=”score-form” action=”/add/score” method=”POST” style=”display: none;”>
@csrf
</form>
Relaxed Guy 2021-01-10 08:44:10
How do I post values from this range input to the database guys ..
jimmy Shukurov 2021-01-10 13:44:41
Wassup
crissgant 2021-01-10 14:26:12
Please support and subscribe my channel and Enjoy the videos
This is a short link to subscribe 👉🏻 http://bit.ly/3877D25
Phen 2021-01-10 15:48:47
gate
Waxikevin 2021-01-10 17:30:43
Need assitance in laravel vue site
I want to have two uniquely designed dashboards and offcouse the landing page
Well my question is how can have the separte dashboard (clients and admin ) upon login
2021-01-10 18:39:46
laravel_discuss-66133.jpg

2021-01-10 18:40:28
2021-01-10 18:39:46

Am trying to send total count from my backend to my view, that’s my code

2021-01-10 18:41:06
laravel_discuss-66135.jpg
This is my view
2021-01-10 18:41:43
laravel_discuss-66136.jpg
This is my error
2021-01-10 18:44:02
I think cause of functions, you have one Variable and name is data in two functions
DesolatorMagno 2021-01-10 18:44:13
Waxikevin 2021-01-10 17:30:43
Need assitance in laravel vue site
I want to have two uniquely designed dashboards and offcouse the landing page
Well my question is how can have the separte dashboard (clients and admin ) upon login

You change the redirection when login and protect each dashboard with role midleware. That’s a option.

jimmy Shukurov 2021-01-10 18:49:49
Why dont u use json
2021-01-10 18:50:29
2021-01-10 18:39:46

instead of $data=Drivers::all()->count() , what happens if you just do $data=Drivers::count();

2021-01-10 19:03:44
2021-01-10 18:50:29
instead of $data=Drivers::all()->count() , what happens if you just do $data=Drivers::count();

Same error

hypernxf 2021-01-10 19:26:01
you can try do a dd($data) and see if $data returns what you expected first.
cod3r_rn 2021-01-10 19:40:20
Can anyone help me
I need to get the a specific column data into array which is will be used for for loop
So how to make the datas to arrray
jimmy Shukurov 2021-01-10 19:42:21
It returns array
jimmy Shukurov 2021-01-10 19:42:35
As default
2021-01-10 19:43:02
hypernxf 2021-01-10 19:26:01
you can try do a dd($data) and see if $data returns what you expected first.

Yes, it returned the value

jimmy Shukurov 2021-01-10 19:43:25
2021-01-10 19:43:02
Yes, it returned the value

So what is the problem

hypernxf 2021-01-10 19:43:30
change the format of view to

return view(‘home’, compact(‘data’));

hypernxf 2021-01-10 19:43:44
inside home.blade.php

Line 1

<?php

dd($data);

?>

hypernxf 2021-01-10 19:43:54
and see what you get
|