Your route (/chefsUpload) is named the same as the directory in /public where you're storing the uploaded images. You'll need to either change the route path or the name of the directory.
Additionally:
-
It may not be the best idea to store user-uploaded images in the
publicfolder, since if you ever push your project to version control (such as on GitHub), those files will stay. You'll want to use Laravel's built-in storage system instead. -
It's unsafe to use
getClientOriginalExtension()as it could allow someone to execute arbitrary code on your server. Useextension()instead. -
In your route action,
[userController::class,'storechef'], don't usecamelCasefor the controller class name, it should bePascalCase. The controller method should becamelCasethough.