#14 Make E-com in Laravel 7 | Admin Details (II) | Upload Admin Image | Install Intervention Package

Published: 01 January 1970
on channel: Stack Developers
3,671
65

In Part-14 of Advance E-com Series, we will continue working on updating admin details and this time we will validate and upload admin image.

For uploading images, we will install 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

2) Update update_admin_details.blade.php file :-
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 admin_photos folder under admin_images folder where we will store all admin images.

4) Update admin_sidebar.blade.php file :-
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 :)


On this page of the site you can watch the video online #14 Make E-com in Laravel 7 | Admin Details (II) | Upload Admin Image | Install Intervention Package with a duration of hours minute second in good quality, which was uploaded by the user Stack Developers 01 January 1970, share the link with friends and acquaintances, this video has already been watched 3,671 times on youtube and it was liked by 65 viewers. Enjoy your viewing!