I am developing app in laravel (REST server), using Basic Auth. Using Postman, all GET requests I have implemented seem to work, but unfortunately POST requests not.
routes.php:
Route::post('my/action', 'MyController@postMyAction');
My Controller:
public function __construct()
{
$this->middleware('auth.basic.once');
}
public function postMyAction($request)
{
// some logic here
}
The problem is, that this way, after setting credentials and some params in Postman, following exception appears:
Missing argument 1 for App\Http\Controllers\MyController::postMyAction()
Does anybody knows how to put request into post-processing function defined in routes?
Thanks in advance.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire