Relative Content

Tag Archive for phplaravelroutes

Postman always gives me 404 on my post requests written in laravel. route problem?

I started laravel for learning purposes, I have been working with php for a long time.
So far I only have db, a User Model, a UserController (register and login), my own routes in api.php. Maybe that would be enough.
But Postman always gives me 404 on my post requests written in laravel. if i see in the documentation correctly it should list my own routes on route:list. I don’t see them there.

why is the same Laravel function behaving differently on different routes?

I’m new to Laravel and I’m trying to build a simple CRUD API to store products title, description and image , but it looks like the store method isn’t reading the image file from the post request no matter what I try to do,
so I just copied the same function and used it in a different route and worked perfectly…
any idea why? and how can I make it work in the /products route?