creativetimofficial / ct-vue-material-dashboard-laravel-pro-bs4

Vue SPA Material template connected to working Laravel REST API with the help of json:api standard
7 stars 2 forks source link

missing api/v1/me #1

Closed rudinum closed 4 years ago

rudinum commented 4 years ago

I tried to update the image on user profile. But I get an error showing that ...api/v1/me is not available on the backend. My question is: Do I have to implement that by myself (how and where to save the image to)? Or shouldn't this be part of the project? Thanks.

eugentudorache commented 4 years ago

Hello and thank you for using Creative Tim products!

You don't have to implement it yourself, this feature is already implemented in the included laravel project, please make sure that your frontend .env file contains the proper values for the VUE_APP_APP_BASE_URL and VUE_APP_API_BASE_URL keys.

eugentudorache commented 4 years ago

VUE_APP_APP_BASE_URL should contain the url of your frontend (eg. http://localhost:8080) and VUE_APP_API_BASE_URL should contain the url of your laravel API. (eg. http://localhost:3000/api/v1)

rudinum commented 4 years ago

Thanks. Yes I found the route. My env is: VUE_APP_APP_BASE_URL=http://localhost:8080 VUE_APP_API_BASE_URL=http://homestead.test/api/v1

No problem with all other routes - only with "$http->patch(route('api:v1:users.update', ['record' => auth()->id()]), $data);" When I update the profile without touching the image, the patch works without problem. Whenever I upload an image it doesn't work. Any Idea what I can do?

And: The EditProfileCard.vue has "image" in if-statement and src, but I think that should be user.profile_image. Can you look into that?

regards Rudi

teamupdivision commented 4 years ago

Hello,

Please go to http://homestead.test/api/v1/telescope and send us what you get in the logs. You might not have writing right on the storage folder.

Regarding the EditProfileCard, feel free to customize the component to suit your own needs.

rudinum commented 4 years ago

Thank you again. You pointed me to the right direction. I figured it out by myself now. I didn't set the storage link correctly.

teamupdivision commented 4 years ago

Glad to help out.

If you need help with any of your projects, we're happy to get in touch. We do custom development for start-ups and companies across the globe (you can check out our portfolio here https://updivision.com/portfolio and some happy clients over here https://updivision.com/testimonials). Don`t hesitate to drop us a line at office@updivision.com or by using our contact form (https://updivision.com/contact).