Skip to content
Advertisement

Tag: laravel-7

Error 401 after successful login to Laravel using jwt

In my Laravel project, I use jwt for user authentication.I successfully login and receive the token. I send the token with the Barear prefix in the header but I get a 401 error.Meanwhile, my project works well on localhost, but it has this problem on cpanel hosts.My codes are below in config/auth.php and in configjwt.php ]; my web route: my

Serialize form validation Laravel 8

could not validate an array of input in laravel 8. from the frontside I have gotten the serialized form data which was successfully accessible from the backend. what I want is to validate the form inside the update function before I update the data when the user changes. what I have tried on the validation function is below looking recommendation

check in blade if exists variable in @include

I´m developping a system with laravel 7.4 and i need check if one variable that i´m sending from my controller exists in my blade. If exists, include it: I have this code in my controller: this return profile image or system image but it´s possible that this images don´t exists and i need check before, because i have error in

Insert a Json object in MongoDB from Laravel 7

I need upload a image to Google storage and insert the below JSON object with the gcs image path in MongoDB. The image is successfully getting uploaded in GCS, but I am not able to get the image url of the image and also not able to update the path in mongoDB. JSON object format Can anyone help me to

Advertisement