91455/how-to-get-the-server-ip-with-laravel
Using Laravel, I can get the client IP with request()->ip().
Is there a Laravel built-in way to get the server IP? Or is it something "impossible" (same problem as SERVER_ADDRreliability)
Hello @kartik,
You can use request object:
request()->server('SERVER_ADDR');
Or you can use standard PHP way:
$_SERVER['SERVER_ADDR'];
Hope it works!!
Thank You!!
Hello, To create both of the created_at and updated_at columns: $t->timestamp('created_at')->default(DB::raw('CURRENT_TIMESTAMP')); $t->timestamp('updated_at')->default(DB::raw('CURRENT_TIMESTAMP on update ...READ MORE
Hello @kartik, in Laravel's inbuilt auth system, the ...READ MORE
Hello @kartik, In Laravel 3, call path('storage'). In Laravel 4, ...READ MORE
Hello @kartik, Use request()->ip(). Since Laravel 5 it's advised/good practice ...READ MORE
Hii, You can use Conditions using Array: $users = User::where([ ...READ MORE
Hello @kartik 1.) Download PHPMailer, open the zip file ...READ MORE
Hello, To register a facade with an alias, ...READ MORE
Hello @kartik, First check your NPM version npm -v 1).Update ...READ MORE
Hey, In order to identify the type of ...READ MORE
Hey, We can get the user's IP address ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.