what i try is to submit from from front end (anguler) a form with a file with user token in request header to my backend php laravel7 rest api
and when i try i have this error
local.ERROR: Invalid stream reference provided {"exception":"[object] (Laminas\\Diactoros\\Exception\\InvalidArgumentException(code: 0): Invalid stream reference provided at C:\\inetpub\\jalssa\\jalssaBE\\vendor\\laminas\\laminas-diactoros\\src\\Stream.php:345)
[stacktrace]
#0 C:\\inetpub\\jalssa\\jalssaBE\\vendor\\laminas\\laminas-diactoros\\src\\Stream.php(60)
my route code
Route::middleware('auth:api')->post('/postVerificationRequest', function (Request $request)
{
\Log::info('start 111111 '.$user);
$user= $request->user();
\Log::info('start 22222222 '.$user);
if($user!= null && $user->id> 0)
{
return app('App\Http\Controllers\API\VerificationController')->postVerificationRequest($user->id);
}
return $user;
});
i tried alot of other methods like
class VerificationController extends Controller
{
public function __construct()
{
$this->middleware('client.credentials')->only(['postVerificationRequest']);
}
...
what i need is just any direct way that i can validate passport token within my controller function easy direct way i will send the token as a parameter or within request header
lareval 7 passport token
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2X9Vgwr
via IFTTT
Aucun commentaire:
Enregistrer un commentaire