Комментарии:
You can just pass 'nullable' or combine it with 'sometimes' against the image in validate array instead of required. This way you can skip the excess code of tap function.
ОтветитьHow about edit image?
Ответитьhahahahha my mistake i used the wrong route . LOL
ОтветитьHi i'm new here, i'd tried your tutorial and it works fine but after i restart my computer and run my project i was having an error and it says ErrorException: Undefined Variable and its pointing to my storage/framework/views/ea7eecb0b97339f006bdcf41542c285a2fb61663.php
I Need help for this. Thanks in advance.
Will this work on online system?
Ответитьhow to create custom image name?
ОтветитьSir, I have a question , how to prevent from uploading a file if the file Extention is changed. from .exe to .jpeg
ОтветитьSorry, I am using laravel 8 but when try to upload the file in store, does not show anything. Can I know why
Ответитьphp artisan storage:link command simlinks storage/uploads in public folder but in blade files photo is not displayed by the code <img src="{{ asset('storage/uploads/'. $article->photo) }}" style="height:50px; width:60px;" alt="Photo">. Could you help?
Ответитьit works well at localhost, but why it does work at server? Thanks.
ОтветитьAfter I run the storeImage method my image field in the database is still null.
Ответитьyou are so good man .. thanks a lot
ОтветитьI get the following error
"Unable to guess the MIME type as no guessers are available (have you enable the php_fileinfo extension?)."
I have already tried to uncomment php_fileinfo extension in php ini but it doesnt work !
please help !
i make laravel project for learning how to add some posts with image on locoalhost work is fine when i share on free hosting i get error with validation input image "the field is required" and gonna to delete the validation rule and i get another error "the file is not exits or not readable".
please how to fix that !
Hi, Your tutorials are awesome and the explanation is too good. Anyone can understand. I am facing an issue of 403
This action is unauthorized while uploading a profile pic of a customer. How to rectify this issue. Please help me. Thank you so much.
what is event(new NewCustomerHasRegisteredEvent($customer));?
ОтветитьMy database gets a path, not a file name. What do I do?
ОтветитьThanks! Awesome tutorial. But It's working fine on the local machine. When I upload in cpanel it's doesn't work (1. cpanel/home/project/--laravel all files except public dir.
2. public_html/--all public dir files in this location). Or how to upload laravel project in cpanel please suggest me.
I have a question If I want to implement user password update in hashed format like a new user registers, how can I implement ?
ОтветитьThanks, you did awsome tutorial!
ОтветитьSuperior explanation, as always!
ОтветитьI am using the Request Class:
public function rules()
{
$rules = [
'name' => ['required', 'string'],
'email' => [
'required',
'email',
Rule::unique('customers')->ignore($this->customer)
]
];
if ($this->hasFile('image')) {
$rules['image'] = ['file', 'image', 'max:5000'];
}
return $rules;
}
hi. i'm looking for a tuto of uploading multi images on the background
ОтветитьThanks for the tutorial but I got an error while selecting a photo.
Error is: The "" file does not exist or is not readable.
how to delete image from folder also..please help anyone...provide me code
ОтветитьIt's "encoding type", not "encryption type".
ОтветитьSir, By default Storage folder ignored by git. So, If any essential file upload in local then how can access in another pc via git?
Ответитьit drives me crazy. image uploads successfully, but in database 'image' field is always NULL. why is that?
ОтветитьClass 'Intervention\Image\Facades\Image' not found problem what can ido
ОтветитьMeaning that we upload 2 files on on server for each upload?
ОтветитьI feel like storing these validateRequest() and storeImage() methods in controller are not the best approach. Where can I move them if it's really better than leaving it like this?
ОтветитьThanks For the videos
ОтветитьNice, thx for these :)
ОтветитьWhen i run the php artisan storage:link this is what i get
The system cannot find the path specified.
The [public/storage] directory has been linked.
It does not create any folder in the public directory. i have been stuck here for hours. i have googled and tried a lot but i couldn't find any solution. do you have any idea why this happens?
Help: The below code work well in my local laravel machine:"
$imagePath=request('image')->store('uploads','public');
$image=Image::make(public_path("storage/{$imagePath}"))->fit(1200,600);
$image->save();"
but not work in digitalOcean cloud: error:"Image source not readable" and
show this code are wrong:
" $image=Image::make(public_path("storage/{$imagePath}"))->fit(1200,600);"
the argument: is :
""make"
array:1 [▼
0 => "/home/forge/default/public/storage/uploads/RSyPwxobjAA9ujEt9ZOfy5B9qJaKeq5LRuoR8jBf.jpeg"
]"
my local machine only got :"public/storage/uploads/RSyPwxobjAA9ujEt9ZOfy5B9qJaKeq5LRuoR8jBf.jpeg"
but in digitalOcean cloud . i got the whole ["/home/forge/default/public/storage/uploads/RSyPwxobjAA9ujEt9ZOfy5B9qJaKeq5LRuoR8jBf.jpeg"
]"
looks like the Make command get different path compared with local Make command .
pls help me how can correct it? thanks a lot.
Do I need to run the link command every time when a user uploads a file???
ОтветитьLooks as if in Bootstrap 4, 'img-thumbnail' doesn't affect the size, just the border. All else good. Thanks!
ОтветитьWhenever i try to login "These credentials do not match our records" error message appears, Any ideas ??!
ОтветитьI noticed that a "php*.tmp" file is created in upload_tmp_dir (C:\WINDOWS\TEMP in my case) for every upload.
The jpeg file is in public\storage\uploads, is there an automatism to remove the *.tmp file created with upload?
Your videos are always easy and simple to follow i really can't thank you enough for these awesome tutorials, thanks.
Ответитьplease cover multiple images uploads
ОтветитьI'm new to laravel and getting started with 5.8 and just came across your channel and I'm learning a lot just from a few videos! In this video your process for uploading an image will it work for a folder of multiple images for a shopping cart? I'm using my own images for my own website. Looking forward to watching your whole series.
ОтветитьThe BEST as always!
ОтветитьCan i get that suggestion with visual studio code? I already have php intellisense but it not even close.
ОтветитьStorage folder Mind Blown Thanks Coder's Tape
Ответить