Are you sure all files are there. Is the files and namespace have proper capitalization.
Just sounds like either a file is missing or a letter case problem.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello all! After moving a laravel 5.5 application to another server I am getting error logs with auth:
[2021-03-01 15:15:50] local.ERROR: Uncaught Error: Call to undefined method App\Http\Kernel::getMiddlewareGroups() in Command line code:1
Stack trace:
#0 {main}
thrown {"exception":"[object] (Symfony\Component\Debug\Exception\FatalErrorException(code: 1): Uncaught Error: Call to undefined method App\Http\Kernel::getMiddlewareGroups() in Command line code:1
Stack trace:
#0 {main}
thrown at Command line code:1)
[stacktrace]
#0 {main}
"}
rrorException(code: 1): Uncaught ReflectionException: Class App\Policies\ModelPolicy does not exist in Command line code:1
Stack trace:
#0 Command line code(1): ReflectionClass->__construct('App\\Policies\\Mo...')
#1 [internal function]: {closure}('App\\Policies\\Mo...', 'App\\Model')
#2 Command line code(1): array_map(Object(Closure), Array, Array)
#3 {main}
thrown at Command line code:1)
[stacktrace]
#0 {main}
"}
The ModelPolicy line comes from the AuthServiceProvider I think. But I don't really know what happened since it was woking before the move.
Any help or tips would be highly appreciated.
Thanks
Are you sure all files are there. Is the files and namespace have proper capitalization.
Just sounds like either a file is missing or a letter case problem.
Please or to participate in this conversation.