After installation of backpack on laravel 5.6, admin page doesnt show up but displays the following error -
Class App\Http\Middleware\CheckIfAdmin does not exist.
Any help will be appreciated
Hello there! Thanks for opening your first issue on this repo!
Just a heads-up: Here at Backpack we use Github Issues only for tracking bugs. Talk about new features is also acceptable. This helps _a lot_ in keeping our focus on improving Backpack. If you issue is not a bug/feature, please help us out by closing the issue yourself and posting in the appropriate medium (see below). If you're not sure where it fits, it's ok, a community member will probably reply to help you with that.
Backpack communication mediums:
backpack-for-laravel tag;Please keep in mind Backpack offers no official / paid support. Whatever help you receive here, on Gitter, Slack or Stackoverflow is thanks to our awesome _awesome_ community members, who give up some of their time to help their peers. If you want to join our community, just start pitching in. We take pride in being a welcoming bunch.
Thank you!
--
Justin Case
The Backpack Robot
Hi @ifyboy60 ,
I'm pretty sure you missed a step upon installation. Make sure you've run BOTH these commands. The first one should publish the file you're missing - you must have not run it.
php artisan backpack:base:install
php artisan backpack:crud:install
Cheers!
sip
It states that the CheckIfAdmin Middleware is missing. So simply creating the missing Middleware will solve the problem.
Here is the Command:
php artisan make:middleware CheckIfAdmin
@deepkh3 thanks it was of great help
@deepkh3 Wow I tried everything possible from my side but i couldnt find the solution but thank god
You saved my ass
Note: If you do what @deepaksp , please make sure the middleware actually checks the user is an admin :-) An empty middleware won't do anything. Cheers!
Note: If you do what @deepaksp , please make sure the middleware actually checks the user is an admin :-) An empty middleware won't do anything. Cheers!
haha lol .. yes please do the needful 馃檹
Most helpful comment
It states that the CheckIfAdmin Middleware is missing. So simply creating the missing Middleware will solve the problem.
Here is the Command:
php artisan make:middleware CheckIfAdmin