Compare commits
2 Commits
7aa090fb08
...
e5a74cb3ec
| Author | SHA1 | Date | |
|---|---|---|---|
| e5a74cb3ec | |||
| dd2b2cf158 |
@ -28,7 +28,7 @@ class UserloginController extends Controller
|
|||||||
$check_user_url = 'auth/auth_user.php';
|
$check_user_url = 'auth/auth_user.php';
|
||||||
$data = ['user' => $request->username, 'pass' => $request->password, 'api_token' => env('LUPMISAPIKEY')];
|
$data = ['user' => $request->username, 'pass' => $request->password, 'api_token' => env('LUPMISAPIKEY')];
|
||||||
$check_user = ApiCalls::CurlPost(json_encode($data), $check_user_url);
|
$check_user = ApiCalls::CurlPost(json_encode($data), $check_user_url);
|
||||||
\Log::info($check_user);
|
dd($check_user);
|
||||||
if($check_user == false){
|
if($check_user == false){
|
||||||
return redirect("user-login")->withErrors(array("System not available at the moment. Try again later!"))->withInput();
|
return redirect("user-login")->withErrors(array("System not available at the moment. Try again later!"))->withInput();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,6 +30,7 @@ class ApiCalls{
|
|||||||
public static function CurlPost($data, $url){
|
public static function CurlPost($data, $url){
|
||||||
// $baseUrl = "https://api.lupmis4luspa.org/api/";
|
// $baseUrl = "https://api.lupmis4luspa.org/api/";
|
||||||
$baseUrl = (env('APP_ENV') == 'local') ? env('API_BASE_URL_LOCAL') : "API_BASE_URL";
|
$baseUrl = (env('APP_ENV') == 'local') ? env('API_BASE_URL_LOCAL') : "API_BASE_URL";
|
||||||
|
dd($baseUrl);
|
||||||
$post_url = $baseUrl . $url;
|
$post_url = $baseUrl . $url;
|
||||||
$curl = curl_init();
|
$curl = curl_init();
|
||||||
curl_setopt_array($curl, array(
|
curl_setopt_array($curl, array(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user