Compare commits

..

2 Commits

Author SHA1 Message Date
e5a74cb3ec troubleshooting 2026-10-13 10:28:42 +00:00
dd2b2cf158 Updated UserloginController.php 2026-10-13 10:26:02 +00:00
2 changed files with 2 additions and 1 deletions

View File

@ -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();
} }

View File

@ -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(