IMAGE UPLOAD LARAVEL - HOW TO UPLOAD FILES
Vložit
- čas přidán 31. 01. 2023
- #laravel #laravelcourse #php #phpscripts #php8
IMAGE UPLOAD LARAVEL - HOW TO UPLOAD FILES
In this video, We will learn how can we upload and store images or files with the help of laravel.
Thanks for watching!
thanks, it's helped me a lot thank you so much
Very Helpful
It is very important for me. Thank you very much for sharing.🙏🙏🙏
Glad to hear that ❤️
after long time ... welcome back
Thanks man, sorry for late.
thank you bro this help me so much in my final project
Glad to hear that! ❤️
Good
thanks for your video
Glad it was helpful!
thanks, you very helped me
Glad I could help
thanks for the video 🙏🙏🙏
Welcome!
thanks for this tutorial ❤❤
❤️
Well said bhai🙏🏽
🌹
It worked and I can see the uploaded image in the folder. However it keeps giving my an error saying "The picture failed to upload." even though it uploaded.
Provide me complete error or email me your code, so I could help
It seems like it is coming from my validator.
$data = request()->validate([
'emp_id' => ['required', 'string'],
'givenName' => ['required', 'string', 'max:255'],
'middleName' => ['nullable', 'string', 'max:255'],
'lastName' => ['required', 'string', 'max:255'],
'suffix' => ['nullable', 'string', 'max:255'],
'sex' => ['required'],
'birthdate' => ['nullable', 'date'],
'birthplace' => ['nullable', 'string', 'max:255'],
'position' => ['required', 'string'],
'empStatus' => ['nullable', 'string', 'max:255'],
'employee_type' => ['nullable', 'string', 'max:255'],
'date_hired' => ['nullable', 'date'],
'civilStatus' => ['nullable', 'string', 'max:255'],
'picture' => ['nullable', 'image'],
'salary_amount' =>['nullable', 'numeric'],
'salary_type' => ['nullable', 'string', 'max:255']
]);
when I removed the validation rules from 'picture' field, it uploaded with no problems. Should I just remove the validation?
so , you not need to link public disk with local disk ?
Yes if you do this code then no need to link storage
I can't input a million in the price, how to solve it?
Could not understand bro, please explain your question properly. Thanks
how do you do this in laravel10
As same as shown
you show only create and store image How about update brother?
Use same code bro
Use same code bro