I got error when I try to run the following code
Error I am getting.
Fatal error: Can't use method return value in write context in Lumen 5.2.
In My Route :
$app->post('oauth/access_token', function(Request $request) {
$userverify=User::Where('username',$_POST['username'])->orWhere('email',$_POST['username'])->first();
if($userverify){
$request->input('username')=$userverify->email;
}
$json = array();
try{
$json = Authorizer::issueAccessToken();
}catch (Exception $e){
$json['error'] = 'invalid_credentials';
$json['error_description'] = 'The user credentials were incorrect';
}
return response()->json($json);
});
Thanks beforehand.