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

Опубликовано: 01 Январь 1970
на канале: 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 :)


Смотрите видео #14 Make E-com in Laravel 7 | Admin Details (II) | Upload Admin Image | Install Intervention Package онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Stack Developers 01 Январь 1970, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 3,671 раз и оно понравилось 65 людям.