I try to save a note through the Store method with a request POST
to the path /categorias
, if I log in the system works correctly, but I have no idea how to do it through of PostMan, I understand that it will never be possible because I must be authenticated before I can do it.
The intention of all this is that I want to do it from an App in android sending the request by the URI and as I realize I need to send the token .. but I have no idea how to get the user's token or how to send it.
Route
Route::group(['middleware'=>'auth'], function(){
Route::resource('/categorias','NoteController');
});
Driver
public function store()
{
$note = new Note();
try {
$note->text = 'Primera Nota';
$note->user_id = Auth::user()->id();
Log::info('Nota Creata');
} Catch (\Exception $e) {
Log::critical('Erro al registrar la nota');
}
}
PDT: I try to login with postman to the path /login
by sending the parameters email,password
as the login form of laravel has them and I realize that it has a hidden attribute <input type="hidden" name="_token" value="'.csrf_token().'">
that I do not know how to send it in the request: (