Laravel Image Intervention Version 3 Upgrade : Everything You Need to Know | Image Intervention 3

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello friend welcome back lot of student ask me about it recently image intervation package is converted to the version three that means two version is not working so for that reasons you may get some of the issue so now in this video I want to discuss about how can working with the image intervation 3 in laravel and as you already know image intervation is used for resizing that images which is very important one of the part okay with this package we can do this work right now if you go to that image intervation official website and here you can see there is a version as a three and two version as the end of life okay that means that is not executed right now so right now I want to do I want to discuss about how can working with the version 3 so if you already install that version two before you can also remove it in that case we have to do we have to remove it as a composer remove intervation image then your existing if you already install the two version you can remove it by this or if if you already install it if you go to that installation so right now if you install image intervation as a composer required intervation image by default that will be installed as a version three like I show you here I have already run one of the project here if you go that is one of the project okay so into this project area right now if you go to that project SC source code and into the source code if you go to that composer Json and into the composer Json you can see I have already installed that intervation image 3 .1 cuz as I told you by default now that will be install the 3.1 CU two version is not exist okay so that is the reasons by default that will be installed that a image interation 3.1 okay so here you will actually get that things I have already installed it so better I want to do in particular that project area first of all I want to do to remove it that means I want to remove that image intervation package so into the image intervation here if you go to that uh vendor into the vendor that should be also another folder as a inter ation okay so when you remove it that will be also removed and in when in previous I have already discussed about that things with you if you already install that image interation to into the config in our appjs you may have ADD some of the allly and also you may add some of the provider right right now we here we don't need to add anything if you already add any provider for the image intervation simply remove it from to the provider and also remove it from to the alysis that will be not needed for the image inter Vision 3 okay so first of all I want to do I want to uh better remove it here if you want to remove it like I want to make it from to the beginning I want to remove that composer remove intervention image now I want to go to that our project so that is one of the LMS project okay for Education purpose I want to do I want to use this project here and into this project area here only you have to write down as a CMD and you can see that is our CMD I have already run it our PHP Ison Ser that is the reason our project is now successfully running right that is one of the project and into this project area if you go to that add category there have the two things one will be as a category name another will be as a category image so process will be just like that same but only I want to do I want to discuss about how can deal the image resize right now with using that image interation 3 okay so that is the reasons I want to do here first of all I want to remove it I have already installed that interven so if you want to remove it from your project you can remove it by the composer remove intervention image CLI as enter now that should be removed everything okay here now that should be everything removed this may take little time here you can see it's now totally done so here it's now successfully remove all that your unnecessary file for the installation now if you go to your project and if you go to that your composer okay here if you go to that your composer Jon and here you can see that is a image intervation is not available right here image interation I have already removed it and also if you go to that your vandor folder and into the vendor folder you can see intervation that is they have one of the folder and now that is totally gone so right now I want to do I want to start it from to the beginning here I want to now install that image interation 3 okay so if you want to do this work we have to go to that our image intervation and into the image intervation package that is our right now version as a three I want to go to that installation and into the installation first job is you have to do you have to understand the your PHP version so right now I'm using that Local Host zamp and my zamp version I'm using as 8.2.4 okay so make that sure that should be equal or greater than from to the 8.1 so that is the most important one of the things and after that I want to do to install it again okay I copy it I want to install it by the composer so here I copy that our total code now I want to do to install it that is in our project area now into to install now click as enter now that will be downloaded everything from to the internet again and now that will be reinstall your Total Image intervation in your project okay now it may also take little time here you can see perfect so now that is also now again successfully installed that image interation 3 and you can see it's now successfully visible as using the version as a 3.1 now if you go to that your project and again if you go to the your composer Json and you can see now I have already installed that intervation images and now I'm using that 3.1 now with this version I want to do I want to insert that image and before when you use it as image interation to as I told you into the configur area in our app.php here before we have to use some of the providers we have to also use some of the allic so in three we don't need anything here I have already install it that's all okay here now I to to use it like if you go to that our controller in our back in that is one of the category controller okay so into the category controller that that have also one of the code so this code I have used it for the image interation 2 okay when you install that image interation 2 then that is all that our code that will be executed but right now I have already updated I have already installed that image inter verion three now I want to down to also update for the three okay now let's do that work for doing this like right now I if you I have already installed that three right here if you go to that our package Jon again into the composer J into the composer Jon I'm using that three now if you want to insert some of the image you will get this type of one of the error like here I want to make it as a test and I want to choose one of the image like here for edication purpose I to choose this image now click as a save changes you may get this type pop on of the okay so as I told you I have already installed that three so that is the reason that will be not executed that is one of the code for the image intervision two so now I want to do I want to replace that code here what exactly I have done if you go to the category controller before simply I get that our requested image that means whatever the image you will be selected right whatever the image you'll be selected uh from to this position so that is actually our field name and our field name here I name it I name it as a f images then I created on of the hexad decimal unique ID and then I get that image client original extension that means if you upload some of the images as a PNG then that will be get that as a PNG okay so this type of one of the things and also before I use it does image make the resize your wide and height and then that will be uploaded in our upload category folder right so and then in our database area I have also saved it in know the database that will be uploaded in our category so it will be Sav it by this name with our generated name and then I inserted that our category data in our category table by this model as a category they have the category name our requested category name requested category slag that will be generated on of the slag and also there is our images and this images means that is our database field name here if you go to that our database I have already created this database like if you go to that database for this project I'm using that is student one and here that is actually our categories and into this categories you can see there is a field name as a category name category slag and that is our image and if you go to that our input field that means our blade page as the add category here also I want to share that things with you then everything will be very clear like if you go to that in our public sorry into the not public in our resources in our view and that is in our admin and into this admin there is a back backend and category so right now only I want to go to that our ad category so into the add category what exactly I have done simply I created one of the route they have one of the NC type multiplatform data everything will be just like that same and here you can see that is a field name as a category name and that is our field name as a image so whatever the the images you'll be selected from here now that will be get that our requested file as a image okay so I hope you get the idea before I have already done these things for the image interation 2 now I want to do I want to work for the image interation 3 so here if you want to do this we have to go to that image intervation right now we are using the three and here if you go to that introduction and into the introduction first job is now we have to do we have to use both of these one is the image manager another is the Z GD and then driver okay so I simply copy both of this now in our project uh that means in our controller category controller right now we don't need to use that as a image here I want to Simply remove it and here I want to use another two of these that will be as image as a image manager and that will be another as a driver so right now after that that is our eore category now here I want to do to update so better I want to also refer this code I only want to do after that okay here after that I want to Simply add one of the if condition that will be one of the if condition I simply added the condition so condition will be the same here if you I want to do if is sucessfully get any images that means a requested so by this requested it will be get that our field name that is input field name I name it as image so whatever the image you'll be selected it will be actually get that image so if they have any image it means here if you select any image right so that is actually our image if you select any image is then you have to do if you go to again okay here if you go then you have to do have to create one of the image manager for the desire driver okay here you have to do you have to take it I copy it and now after that I want to do I want to Simply call it okay and now our next process will be same that is our previous code I want to also get some of the references from here then that will be helpful here I copy it and then I simply paste it so now that will be generated I take on the variable as a a name generate it will be created on the hexadecimal unique ID and then that will be our images images will be which one here I want to do I want to pass it I want to pass that our requested file image okay here I simply pass it our requested file image and that will be get our gate client original extension that means whatever the things will be added it will be get that as a PNG jpz this type of one of the things okay so now after that here that is another one before I have used it as a email that is a images resize with the save that will be save in our public category right so this type of one of the things now here I want to to change it here in that case we have to do better I take on the variable as image and image will be which one here I have already get that create our extension now I take it by this manager now that will be with this manager and now with this manager here we have to do have to call here if you go with this manager we have to call that our read function so so that will be as a read image from to the file system so okay here you have to do you have to call it I simply call it again so that will be as a manager and then there's a read function and read will be which one here it will be get that our whatever the requested file will be uploaded you have to do you have to Simply pass it you can also take another variable as for your Demand by this you can actually also pass that uh our total things like here you can also take another as a take image I take one variable as a take image image okay take image will be which one that will be our requested file name that means that will be your take image so from here you can actually take it you can also pass that variable in particular that area Okay so that will be also the same things here only now we have to do we have to actually call that read so I hope you get the point better right now we don't need it I want to close it and I want to Simply get that our requested image okay that will be our requested file as a image file so here now we have to do have to call that read function now that is how we started that is ended here that will be another one right so that is actually started and that is ended that is started that is ended so here make that sure you do you have to do you have to load it that is a read now after that we have to do we have to resize it before I have already used it as a resize by the wide height right so now if you want to do this work that is actually our image now I want to do I want to take another variable as image and image will be which one here I want to want to use that as image and that is the image that will be as a res siiz okay the res size res size so that will be as a res size and then you can actually use it as a height and weight I want to don't use it as a height and weight that will be as a 370 and 246 okay now after that here that will be saved this data and now I want to do I want to Simply use it so now with this image okay now with this image I want you have to do you have to call it we have to call it another function fun as a 2 jpz okay P easy that will be a 2 jpz D and here you can actually you have to assign some of the quality like I make that quality that will be as 80 and then after that I want to do to save it I want to save it in our who place I want to save it in our base path that will be as a base okay that will be as a base underscore path path and into this path means here I have already created one of the folder in our app public and that is in our upload folder that is our category folder here now I want to do to save it okay so that is the reason here I have already created this folder now I only want to do that will be I want to Simply copy it now first of all that will be as a public okay public folder public folder and then that will be our upload folder and then that is our category folder now after that category that will be generated whatever the name I have actually created so now that will be simply added that our generated name sorry that will be as a conation and then that is our generated name okay great after that that will be the semicolon and now also I want to do I want to save it before I save it like that way so that will be also just like that same here I take one of the variable as a save URL and into the save URL that means that will be saved into the database as a upload folder category folder and that will be our generated name okay and great so that's all here we successfully done this job now after that that is our category inserted now have to do have to take it better I copy it now in our if condition area here I want to do on to paste it you can also use some of the else in here but right now it's totally fine okay that is our and if I make it as and if condition okay and rest of everything will be same here it should be display on the notification as a category inserted successful alert type will be success it should be returned to our all category pce that's all okay friends that's all for the image interation three now that should be stored this data in our upload category folder with the resize by the 370 and 246 okay and also it should be displayed the data in our category table by the category name that's category slag and that will be our image image will be saved that is actually our image okay so now let's check this out if you CLI as a save all and now I want to do I want to go to that our project here right now I want to refresh it okay that is also one of the m like that is a driver here if you go to that our code here you can see there is a if condition that is one of the first bracket is missing so that is if condition that is started and that is our images okay here actually they have some of the F bracket missing now if you click as a save all and now I want to check it again here if you go if you refresh it h you can see now that it successfully loaded our at category so right now our database is totally empty and also our folder is totally empty now let's check check this out if you want to choose any image here I want to go okay here I want to name it as a test one or category one category one okay I name it as a category one and also I want to choose one of the image like education purpose I want to choose this one now click the save changes H you can see there is a category inserted successfully and also now that is our category image is visible category name is visible here if you go to the our database now that should be yeah you can see successfully stored that our category name it successfully generated that our category slag and that is our uploaded category and that is our specific unique ID code right that means image unique ID and that is our do extension great so how to do this work I hope it's very clear and if you go to the our folder and you can see that the new image is successfully inserted and if you put your couser our expected ratio as a 370 and 246 so how to do this work friend I hope it's very very very much clear to you okay here if you want to add another one I click as ADD category I name it as a Aran ran and that will be I choose another image uh for Education purpose chooses now click the save changes there's a category inserted successful there is another image is inserted successful okay here how to insert some of the data with using that image interation at three now I hope it's very very much clear to you so thanks for watching and I will see you in the next video
Info
Channel: Learn with Kazi Ariyan
Views: 11,291
Rating: undefined out of 5
Keywords: laravel, Laravel 10, laravel tutorial, laravel full course, Laravel 10 for beginners, Learn Laravel 10 from scratch, Laravel 10 course for beginners, PHP framework tutorial, Laravel MVC tutorial, Blade templates tutorial, Laravel routing tutorial, Laravel 10 Complete Project, Image Intervention 3, Image Intervention 3 setup, Image Intervention Laravel, Image Intervention tutorial, Image Intervention example, Laravel image processing, Image Intervention resize
Id: iD6ThMYed9E
Channel Id: undefined
Length: 18min 29sec (1109 seconds)
Published: Wed Dec 20 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.