If I am correct the original version of the laravel project was 5 ( It could be lower but I am not sure ) and it was updated to 7.2.
I had fixed the problems with the testing files ( testcase.php , composer.json, ... ) and now it works, but I notice this problem.
Regarding the method it is quite long, but it is working fine and it is also an endpoint - ( tested on Postman ).
I know that there are major changes in the front-end but I am working more on the back. Compact() is being used instead of response()->json() , which I tested and it worked in my tests.
And from the testing part, here is a simple test the confirms a member_id ( it only works if I changed to a json return in the method.
public function testExample()
{
$json_post_array = [
"forms" => [
[
"sex" => "1",
"user_id" => 342868,
"security_id" => 297345,
...
]
] ];
$response = Http::post($url, [$json_post_array]);
$response = json_decode($response);
$this->assertEquals($response->data[0]->member_id,99463);
- I have removed some stuff so it would be simple to read.