I'm new to Laravel and all that, and currently working on a little project. The task is to separate admins and users. So I want, just my admins, to access example.com/admin/dashboard. I read through some docs and came across this:
"2) Middleware to app/Http/Middleware/CheckIfAdmin.php
This middleware is used to test if users have access to admin panel pages. You can (and should customize it) if you have both users and admins in your app." in: https://backpackforlaravel.com/docs/5.x/base-about
But since I'm new to all this, I don't know how to "customize" "app/Http/Middleware/CheckIfAdmin.php".
Plus, do I need a second table for my admins, or can I just add a new column, with the name is_admin for example, to my "users" table? Can I do it with just app/Models/User.php, or do I need a separate app/Models/admin.php? Also, which guard do I have to use in "config/backpack/base.php", since when I use "null" instead of "backpack" or "web", I get an error saying:"guard [null] is not defined".
As you can see, I'm pretty lost here, but I hope that someone can help me with this. If you need more information, just ask for them, I would be happy to provide them.
Please bear with me, since I need clear instructions, so I get everything right ^^ also, please excuse my English, since I'm not a native speaker
Thanks in advance for your answers :)