What am I trying to do?
I already have a website and am trying to authenticate a token for an API in the same code, and below is an example authentication code
I created the controller below - this is the code.
class AccountController extends \App\Http\Controllers\Controller { public function apilogin($UserData) { return json_decode($UserData); } }
My route configuration is below.
Route::group(['prefix' => 'api/v1', 'middleware' => 'auth.api'], function () { Route::post('/apilogin', 'API\User\Account\AccountController@apilogin'); });
** Then, from the Postman Chrome Extension, I sent a request and worked perfectly if you comment on the next line from $ middlewareGroups in Kernel.php
\App\Http\Middleware\VerifyCsrfToken::class,
I have no VerifyCsrfToken problems if I make a GET request from the POSTMan extension
Pankaj May 23 '16 at 5:26 a.m. 2016-05-23 05:26
source share