This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//use this code in your function: | |
use App\Verification; | |
use Symfony\Component\HttpFoundation\Response; | |
$messages = [ | |
'number.required' => 'شماره تلفن الزامی است', | |
'number.unique' => 'شماره تکراری است لطفا وارد شوید.', | |
'number.regex' => 'فرمت شماره شما صحیح نیست', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function _getUserRealIP() { | |
$ipaddress = ''; | |
if(isset($_SERVER['REMOTE_ADDR'])) | |
$ipaddress = $_SERVER['REMOTE_ADDR']; | |
else | |
$ipaddress = 'UNKNOWN'; | |
return $ipaddress; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function _getUserRealIP() { | |
$ipaddress = ''; | |
if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) | |
$ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR']; | |
else if (isset($_SERVER['HTTP_CLIENT_IP'])) | |
$ipaddress = $_SERVER['HTTP_CLIENT_IP']; | |
else if(isset($_SERVER['HTTP_X_FORWARDED'])) | |
$ipaddress = $_SERVER['HTTP_X_FORWARDED']; | |
else if(isset($_SERVER['HTTP_X_CLUSTER_CLIENT_IP'])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function _getUserRealIP() { | |
$ipaddress = ''; | |
if(isset($_SERVER['HTTP_CF_CONNECTING_IP'])) | |
$ipaddress = $_SERVER['HTTP_CF_CONNECTING_IP']; | |
else | |
$ipaddress = 'UNKNOWN'; | |
return $ipaddress; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function _getUserRealIP() { | |
$ipaddress = ''; | |
if(isset($_SERVER['REMOTE_ADDR'])) | |
$ipaddress = $_SERVER['REMOTE_ADDR']; | |
else | |
$ipaddress = 'UNKNOWN'; | |
return $ipaddress; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HASH="$(wget -q -O - https://composer.github.io/installer.sig)" | |
php -r "if (hash_file('SHA384', 'composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//add from here | |
$this->app->bind('path.public', function() { | |
return base_path().'/public_html'; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//This is start of code to replace | |
if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { | |
return false; | |
} | |
require_once __DIR__.'/public/index.php'; | |
//End of old code |
OlderNewer