|
@@ -122,6 +122,8 @@ class AuthorizationsController extends Controller
|
|
if (!$user=User::query()->where(['mobile' => $mobile,'is_distory'=>0])->whereNull('deleted_at')->first()) {
|
|
if (!$user=User::query()->where(['mobile' => $mobile,'is_distory'=>0])->whereNull('deleted_at')->first()) {
|
|
throw new Exception("用户不存在");
|
|
throw new Exception("用户不存在");
|
|
}
|
|
}
|
|
|
|
+ file_put_contents('login_log.log',date("Y-m-d H:i:s").var_export($user->toArray(),true).PHP_EOL,FILE_APPEND);
|
|
|
|
+
|
|
$credentials = ['mobile'=>$mobile,'password'=>$password];
|
|
$credentials = ['mobile'=>$mobile,'password'=>$password];
|
|
|
|
|
|
if (!auth('api')->attempt($credentials)) {
|
|
if (!auth('api')->attempt($credentials)) {
|