**The content of this video is intended for
educational and entertainment purposes.** **It is NOT production ready.** If you're new to the channel, welcome.
If you're not new, welcome back. Today we are going to start looking at Filament.
The projects I have on my channel start with this type of preview episode where we take a quick
walk through what we will be building and what kind of functionality we will have for you
to expect. As we proceed through the series, I will point out pros and cons that I think
will help you decide for what kind of projects this admin panel would be good. There's
a lot of potential with this admin panel, but there are also some limitations to be aware
of. To start us off we have a dashboard, we have different information on it. This is pretty much
dummy information, but I did add user information to this chart right here, so you can see when the
users joined, how many in September, how many in January, how many in August, and you can do all
different kinds of customizations to this which is absolutely fine. Filament has suggested to
use Spatie's Laravel roles and permissions to set up roles and permissions, and that's what
I've done for this project, but I do think that potentially any one of them even if it's
Laratrust or anything like that, they would all work pretty much the same. At any rate, the
first thing that I did was I set up permissions. One more thing too, this is a little bit
of a drop down here. You can click it, close it up, open it up. That's a little hidden
feature and there's just a lot of unique little things that you can do here. The first thing we
have is a list of permissions, and we have their created at date you can edit. You can delete and it's also
paginated. That's already come included with the setup. You also have search, so let's say I want
to do read. Anything that I have with the name read, that comes up in our search and then you
can x out of that, get rid of it all together, and then we can go ahead and create a new
permission. Instead of using a page to create the permission, I just set up a modal. Let's
say test category, went ahead and clicked create. It's been created up here, if we go all the way
to the end you see that we have the test category in here, and if you open it up then we have
the same modal where you can edit it as well. The next thing we have are roles, and I created
some dummy roles. You have a super admin, admin, moderator, developer and we also have user.
I've set it up so that the roles have permissions and the users have roles. If we go ahead and
open up any one of them -- well actually, let's go ahead and create one. Now this is a little
bit different to the modal we have, and that's because I just wanted to show you different ways
of doing it. Let's go ahead and just fill this in, and we can add any one of the relationships
that we want, as many as we want. This is a multiple select because the relationship is
belongs to many. Let's go ahead and create. It's been created, and if we take a look here
Malik Luna is the name of the role, not the user, the name of the role, and we have it's created at
date. If we go ahead and open it up again, you see that we have the permissions included, and if you
look down here we have the permissions that are attached to that role, and if we wanted to create
a new permission we could do that here as well. New permission, and that has now been created. Fantastic! The
next thing I want to do is take a look at the users that we have here, and as you can see we
have -- these are the names super admin, admin, moderator, developer. I named the roles for those
admins, I've named them the same as a user name. That's what I did for the admins, but as you can
see for the users this is the user name, and this is the name of the user role. The role name is
user. I hope that's not too confusing. In some of the other admin panel projects, that seemed to
be a little bit of a confusion for some people, but it's super simple. You can name these whatever
you want to name them too, but these are the name of the roles. I just did it so that I would
remember what they were for. Now one of the cool things that I found too is that there is a
Boolean field for the tables, where you can add any kind of Boolean you want. For us, I added
is_admin to the users table. We have a true value here and a false value here, because these
are not admins. One of the other things I did too was added soft deletes, so we do have that here
as well. Let's go ahead and test this out. We'll go to -- we also have search functionality in
here, like we did with the roles and permissions, but if we go to new users, we'll go ahead and
create a new user. We won't make this one an admin. We have an email, password is password,
these are the roles. I put here helper text, so this is one of the issues that I ran into,
to say only choose one. I'm going to go ahead we'll give it the name, the role name of our
new role that we just made, and then I'll get rid of the other ones. Then we'll click create,
because remember the roles are already attached to the permissions, so we're just giving roles
to users. Let's go all the way down to the end, and this is our new user. Okay, and they
are not an admin. This is their role name, this is their email, and we don't have any deleted
at functionality but let's go ahead and delete. Are you sure you want to delete this? We'll
say delete, but we already know that it's a soft delete so we're going to go back to
that user and see now that user is gone. But we have a little filter icon here. Right now
we're displaying it without deleted records, but if we add with deleted records, that changes
up the whole table. Let's go over to the end and now you see we have that user that we just
deleted, and we have the deleted at date and time for that. I'll change up the formatting of this,
but as you can see they're deleted. We can also change the filter to only deleted records. Now
we're seeing the user that we just deleted. Now that we've taken the walkthrough, the
schedule for this project will be as always, I will publish the videos on Mondays. If I'm
physically able to do it, then I will try to do it a second day a week. I cannot guarantee that, but
I will make sure that you have videos on Mondays. If you're enjoying the content, please
go ahead and click that like button as it really does help out the channel.
Here's a video YouTube thinks you'll like, and here's a playlist to follow along.
Thanks for watching. I'll see you next time.