DarkAndBrewed's avatar

Missing POST requests

I'm running into an issue with Lumen 5.4 where I have a POST route that works just fine, and another that completely fails to acknowledge POST data.

Here are the two routes:

$app->post('/user/login', [
    'as'   => 'login',
    'uses' => 'UserController@login',
]);

$app->post('/user/create', [
    'as'   => 'create',
    'uses' => 'UserController@create',
]);

And the methods:

public function login(Request $request)
{
    var_dump($request->input(), $_POST); die('!');
}

public function create(Request $request)
{
    var_dump($request->input(), $_POST); die('!');
}

The login method will show all the fields in the POST request for both the input and superglobal. The create method will show empty arrays for both.

Since there's no difference in anything between the two, does anyone have any ideas on what I can check?

0 likes
0 replies

Please or to participate in this conversation.