Install Laravel Admin Panel | Admin Dashboard in Laravel | Admin Panel Laravel | Laravel Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] all right let's get started so first we'll create a directory and i'll call it chmark.divestack.com so this should be the folder where we install our learnable application and laravel admin palin panel everything together okay so let's get into this folder and then run this command and it will ask you to run it as a super user or root so give it permission as yes but it might take a couple of uh command line installation which i prefer very much so we'll go ahead with that let's see our installation yeah it's still doing i think it would be done pretty soon yes right okay perfect so now it's been done and after that uh we need to connect our laravel application the one this one has been installed to our database all right okay so let's go to our ftp folder or whatever uh client tool you're using so here i should have this one that's right as you can see laravel is installed here and i have this env file and we need to edit this env file though okay now we have to set the env file in some configuration okay so let's go ahead with the configuration so i already have this opened the configuration file which is enb so a few things we need to change over here uh the first one is database name well i already have the database name admin i'm using user as a root and password well i can't tell you the password my own password so go ahead and set up your own password you should be done with this file env file and then we would go ahead and install this command line over here this line so it's pretty easy uh so after setting the env file here we are and we have a folder which is called a laravel we'll get into laravel folder and we'll see that we have this uh different packages for laravel itself now what we'll do will come to this place i will put a link below there you can download it from there or you can follow it with me with the commander line so we'll copy the first one and then it's asking you if you want to install laravel admin as a root or super user so give it permission it should be done pretty soon okay perfect all right and after that let's go ahead and do run this command for assets and config okay done and then let's go ahead and install this one okay well i guess it does um or to generate some files for you as you can see over here okay all right so that's pretty much done with this setup okay after that setup we have to run some commands on our terminal make sure that you have this env file configured where you have set up your database name username and password after that in general i like to run these commands one by one what it does it takes care of every permission and files this and that so that's why you should do it so you can just follow along with me and do it this is the first command and so this is for generating some key and then let's clear the cache over here all right and after that we have this one for database and migration all right nothing to migrate it doesn't matter just continue and then for storage permission and after that i guess we don't need the composer so dump it all right and then again for apache uh permission and after that bootstrap permission apache bootstrap and let's see this one the last one is this okay and if you further encounter error so it might be that your htaccess file uh it might have some permission problems so go ahead and do that and but this option is not necessary in general you should run all the commands from section two to number two to ten all right okay so i'll put a link for this one below as well okay so next if we can run the website on the browser okay so our website address was uh chmark dot the best tech dot com let's see wow perfect so the website is running but this is the front end of the website so now we'll see if we can install go to the admin section in general once you install the package from here or any kind of package for any package for administerable it comes with a default password and username which is admin and admin so password should be admin and username should be admin okay perfect so let's see here we are with the admin panel with laravel that's amazing because it saves us so much time with laravel that you don't need to create the panel the backend on your own and here you have some information you can go through them on your own and they are pretty useful though all right now you can close them if you want all right and then we'll take a look at this dashboard and the admins all right well dashboard should be this this options over here we saw early and then we have this admins and we have users uh like i'm here the administrator and of course you can change their rules and permissions all right and it also has menus all right like that so next we'll see how can we create our own menus and the navigation section okay just now we created this admin panel but it pretty simple now we'll take it one step further we'll create an icon here where it will say users we can also create a panel or a menu for articles or for products whatever you want to show over here well now we have this another website this is laravel admin org this is the official website and over here it tells you how to create a controller okay so this is how you create controller on windows you use this one on linux you use this permission okay admin panel and we want to add here more menus and buttons things like that okay and say for example on the front end you want to show articles so it will have a menu for posting articles and editing articles things like that or if someone signs up in your page so you would want to uh know who's signed up so for them we'll have a user section over here all right okay so now i have this terminal open here so make sure that you are in the laravel folder or your whatever folder you use to save your learnable project and after that let's come here this is the official website and in the official website it says that how to add a controller we need to add controller and models because we want to add menus over here and want to navigate all right okay so it says that on linux you add controller like this and on windows you use controller like this this is the lightest version we'll skip that and do remember that at the same time you should have a model the model's name is user you have to have one if you don't have one you need to create one okay let's copy paste this uh before we continue let's go to our app directory and go to the admin folder this admin folder is responsible for holding all of our controllers uh for our backend all right so back end controllers backend controllers they all live over here within this okay so most probably this is the home controller for back end all right okay and now the models like for example we want to create a controller and now there should be a model but this model has been auto generated when we created our larval admin or we installed laravel admin uh from command line so you should have one if you don't have one just go ahead and create a model okay and type in the properties but you should have one now this model is missing a controller so we'll create a controller and the controller would live in this folder and earlier we copied this command so what it will do we'll go ahead and copy paste it and run the command well now it says that the model doesn't exist well it could be that it's missing the pop because they might have updated their structure but the documentation might not be the latest one though so for example take a look at this code so over here the model is within app our model is user where where does it live it lives within app models user like this so we need to change our path over here that's what we did all right and most probably you also need this uh what are these things single code all right let's run this perfect so it created a user controller for us and it told us at the same time add this line in in your app admin routes so app admin route so this one this file so let's go ahead and add it so it has some default installation as you can see we can ignore that all right now we'll save it okay now after saving it let's go ahead and check our admin panel but in the admin panel we don't see a lot of extra thing though so now let's see what happens here so we come to menu section now here over here we might have uh you see it's called users so let's go ahead and click on this let's see what is this okay so what we could do we could create an icon for this for this users so well title first we'll create a title so we'll call it users as well and over here we'll call users or any any icon you want to use maybe this one all right and input uri so this uri is this one over here users okay so slash users and the role as administration permission say well just maybe keep it default and let's save it and see what happens okay all right so now so i guess we have this this one and let's see we might be able to change it though so let's refresh it oh yes it's over here actually so what happened just now because we created this uh controller which is this one and the controller should be here let yes right so this is the user controller that we created early okay and it it has some default id or column like this okay and because we created this one based on this model so on the back end we are able to see this one and this one is actually this one so we can go ahead and open it up as you can see so perfect so we have these things you see so it's so easy to create a admin panel and your related buttons or navigation buttons through this admin panel laravel admin panel package okay that's pretty easy so let's go ahead and create a new user okay i would say and a dot a dot com password say one two three one two three okay perfect so the user has been created as you can see of course this information would be coming from your back end your sorry front end so on the front end you will have maybe a user login page or signup page and their information should be saved over here right so that's how you deal with front and back and together okay next we'll see how to create a article controller and we'll have article navigation menu over here okay now we'll see how to create a menu over here that means the article menu so that you'll be able to create articles post articles and edit them but to do that first we learned that we need to have a model as we saw earlier over here so let's go ahead and create a model so we'll call it phprt sun [Music] and we also want a resource for it which is migration table let's go ahead and run it and it created a migration table successfully for us the next thing we want to do is uh run this command and create a controller okay so let's go ahead and do it and we could do like say app models and article and then instead of calling it user controller we'll call it article controller okay now it created this one and it's telling us add this in your resources uh routes so let's go ahead and find a route but i don't need this thing so let's go ahead and paste this one okay we should be good to go so we created this one and next thing we want to do is check if we have the articles here or not so we have this article that we created early now let's take a look at the model so we also have the model and now let's go ahead and check our database migrations and this is the article migration that we have earlier okay so we want to create two more fields over here so we'll call it table under say string string we'll call it what is the name of the article or title title sounds better and then table also text and content content of the article okay so these two fields we have added all right okay now we'll go ahead and do a migration so we'll call php rds in my great it should be able to create a table in the database for us perfect okay so now we're done with migration and we have this model now we need to change our article over here uh but now there would be too much coding so what i would do i would copy from our user controller and paste it right there ctrl alt v now we need to make some changes because over here we'll be using the model that's called article article and the controller is article controller and over here this is article again and this one article all right okay so you know these things we really don't need here now uh what we need is a new grid that's called let's call column and we'll call it content sorry content and the name we show on the back end that is content all right so that's all we need okay and now what we do we can copy all these things so that we could be efficient and put them all of them here but do remember we need to change the model name so this is article and well now it's a show object so let's change them to show okay all right in this form object we have to do the same thing first let's copy paste all of them sorry this one copy paste all of it and the first thing we want to change is this object name perfect now of course we don't need the id because this is for editing we don't add a database id now the name was i think that was a string type so let's go ahead and type string and the content was or it should be text type right the content so because let's look at our migration table it is a text all right and these two tables or things we don't need to worry right now okay so that's what we have so let me tell you this is for showing the articles this is for creating an article or i mean these are all the articles when you see on the back end one by one we'll see that later and this is for clicking and see and this is for editing all right so we we have this so far let's go ahead and refresh it nothing is there so we could do and create a new menu so we'll call it r t calls and i can say books this one and uri should be articles or article let us see which one let's find a route so this one right but let's not make mistakes i guess they're same perfect enrolls in the administrator and submit it perfect so we already have uh article over here and let's refresh it we should be able to see that right and let's click on the article perfect okay so these are the field we have in the database in our migration table as well as in our article controller so this is what i was saying just now so when you view these things all these things are coming because of this method okay all right now let's see if we can create one uh well now it says that controller's user is not found article controllers so we might have uh made a mistake and forgot to make a change this one so we'll call it rt curl okay now let's refresh it the arrow should be gone let's try it again now the string doesn't exist uh i'm not sure why it doesn't accept string let's change back it to text let's see yes the arrow is gone now let's create an article name is laravel and the content is the best back-end framework let's submit it and we have another problem here unknown column field uh somewhere okay let's see uh we were not able to submit it so the name is most probably that's due to because in the table over here actually this is a title this is another copy paste problem so let us change all of them okay and let's see let's save them okay let's try it one more time [Music] the best back-end framework let's submit it perfect so that's what we have here all right so that's how you create articles or a navigation menu on the back end okay so that's why i love laravel admin panel because it makes your life so easy you don't need to do everything on your own it comes with the default package and comments so all you need to do create a model and then a controller and then a migration table and pretty much copy paste the content from your earlier con containers it makes your life easy okay all right so now it's up to you how you view this thing on the front end by the way if you want to view them on the front end so now over here all you need to do create new article controllers in the http controllers over here right as as you know that this is the default variable setup for front end controllers they're all living in this folder so if you want to view this information on the front end just create a controller and call them from there and you should be pretty good to go and if you liked it don't forget to share thank you so much
Info
Channel: dbestech
Views: 7,972
Rating: undefined out of 5
Keywords: install laravel admin panel, how to install laravel, laravel admin panel, admin dashboard in laravel, laravel admin panel tutorial, how to install laravel admin panel, how to make admin panel in laravel, laravel 8 tutorial, example install laravel, laravel admin panel from scratch, example install admin panel, admin panel in laravel, how to create admin dashboard in laravel, how to create admin panel in laravel, laravel user management system, laravel admin panel development
Id: 1-6vBAPvU4k
Channel Id: undefined
Length: 23min 14sec (1394 seconds)
Published: Sun Jun 20 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.