Laravel 9 Tutorial #15 | Create Multi Vendor Website | Install Intervention Package in Laravel 9

preview_player
Показать описание

In Part-15 of the Laravel 9 Tutorial to create a Multi-Vendor E-commerce Website in Laravel, we will continue working on admin settings in which we will add the functionality of updating admin details.

In this video, we will add/update the admin image. For uploading images, we will install an intervention package that will help us to resize images as well.

1) Install Intervention Package:-
Simply run below composer command to install Intervention Package:-
composer require intervention/image

Add enctype="multipart/form-data" in update admin details form to accept files and we will also add condition to show admin image and add another hidden field for current admin image.

3) Update updateAdminDetails function :-
Now we will update updateAdminDetails function to add validation for image and will add upload image script and finally save the image name in admins table as well.

We will create photos folder under /resources/views/admin/images/ folder where we will store all admin photos.

Now we will update admin sidebar with admin image who logged in. If no admin image exists then we will show some dummy image.

Thanks for watching :)

Popular Stack Developers Series that can help you:-

►Join this channel to get the complete source code of all series:

Follow Stack Developers on Social Media to get updates and resolve your queries

#laravel9 #laravel9tutorial #laravel
Рекомендации по теме
Комментарии
Автор

Dear Brother: You have all the respect and appreciation
I am Egyptian, I speak Arabic.
I also speak English, but with difficulty
Your pronunciation is very difficult for me to understand
But I learned a lot from you
More than I learned from Arabic speakers
You have all my appreciation and respect, you are really an excellent teacher

أشرفبدوي-عث
Автор

Awesome and Easy To Learn Tutorials of my Life. keep Continue Dear Gupta.
Love from Pakistan

Azizullah-cesi
Автор

Awesome series with great knwledge...
can you please mute your keyboards tiktik? its kinda distracting sound

jjplays
Автор

Thanks a lot, I have been suffering GD Library extension not available with this PHP installation. But Finally, I can solve this issue

mdmilonmahamud
Автор

thanks for your help
I have a problem with my app, I installed the intervention package, use Image, and copied pasted your code but the image never store in the photos' folder and the VIEW IMAGE in the balise doesn't show in the form.

imajlakay
Автор

Sir. why your code is not consistent?
$image_temp and then $imageName
mixing naming conventions...
why not both $image_temp && $image_name
or both $imageTemp and $imageName??

jjplays
Автор

Thanks sir g relly helpful this course.but i have issue when view image but error 404 because url double ho jta ha db ma b path save ho rha or ik path ma khud dy rha jis sy image show ni hoti or not found ka error ata ha.plz solution bta dy

UsmanKhan-neyw
Автор

thank you sir for this course. but I got a problem while uploading image which says: GD Library extension not available with this PHP installation.

abdullahismailzai
Автор

i want to change my profile image in admin panel but this code line did not work

MuhammadImran-tbxy
Автор

How shall we fix the ERROR: Unsupported image type image/vnd.microsoft.icon. GD driver is only able to decode JPG, PNG, GIF, BMP or WebP files.

jjarjona
Автор

@StackDevelopers

thanks for your help
I have a problem with my app, I installed the intervention package, use Image, and copied pasted your code but the image never store in the photos' folder and the VIEW IMAGE in the balise doesn't show in the form.

saberdems
Автор

Actually bat ye h ki ye database me save ho rha h to uska path nhi shi h aur jo laravel me hmne Jo path diya h wha pe shi se uska name
Mtlb rand number with extension ke sath save ho rhi h image but database me aise nhi save ho rha h thoda sa code check kro Aisa ku ho rha h hmse khi mistake ho rhi h kya

crazysmilexyz
Автор

Sir yeh error hai
(GD Library extension not available with this PHP installation.)
Xampp version 8.1.6 hai fir bhi ??

protrickscornerofficial
Автор

hi bro when I updated image then previous image does not remove from public folder that's why folder size increase. How can I remove previous folder

zitsbd
Автор

Class "Image" not found
Sir this is what am have when i want to upload thé image

philippeche
Автор

hello sir do u have a full code validation for image here?

NoLongerStranger
Автор

I have this error "Unable to find file ()" please somebody can help me ?

yaen
Автор

Sir ya sub ap already laravel 8 ma cra chukay hain

asadiqbal
Автор

keep from bloating image folder with images ```
if (!empty($current_image_name) && {
$path_to_image =
if (file_exists($path_to_image . $current_image_name)) {
unlink($path_to_image . $current_image_name);
}
}
'''

chris_james