In the API routes I am calling a function through POST and GET method. GET method returning data's but POST method throwing method not found exception.
Here is my sample code in routes/api.php
//api.php
Route::middleware('auth:api')->get('/user', function (Request $request) {
return $request->user();
});
//login values
Route::post('login', 'Auth\RegisterController@loginAPI');
//Auth\RegisterController.php
public function loginAPI( Request $request )
{
$reqdata = $request->all();
$usermail = $reqdata['usermail'];
return $usermail;
}
It's working fine before 2 months but suddenly it's not works https://imgur.com/6sa7cfK
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2JSVKkh
via IFTTT
Aucun commentaire:
Enregistrer un commentaire