I am trying to deploy my site to a staging domain. I have done everything correctly(as far as I know) but I get this error when i go to my domain from the browser.
BadMethodCallException in compiled.php line 6341:
Method after does not exist.
in compiled.php line 6341 at Router->__call('after', array(object(AfterFilter))) in compiled.php line 2265 at Router->after(object(AfterFilter)) in compiled.php line 2265 at Application->boot() in compiled.php line 2265 at BootProviders->bootstrap(object(Application)) in compiled.php line 1693 at Application->bootstrapWith(array('Illuminate\Foundation\Bootstrap\DetectEnvironment', 'Illuminate\Foundation\Bootstrap\LoadConfiguration', 'Illuminate\Foundation\Bootstrap\ConfigureLogging', 'Illuminate\Foundation\Bootstrap\HandleExceptions', 'Illuminate\Foundation\Bootstrap\RegisterFacades', 'Illuminate\Foundation\Bootstrap\RegisterProviders', 'Illuminate\Foundation\Bootstrap\BootProviders')) in compiled.php line 2465 at Kernel->bootstrap() in compiled.php line 2415 at Kernel->sendRequestThroughRouter(object(Request)) in compiled.php line 2400 at Kernel->handle(object(Request)) in index.php line 54
This is my .env file
APP_ENV=staging
APP_DEBUG=true
APP_KEY=key
DB_HOST=localhost
DB_DATABASE=db_name
DB_USERNAME=username
DB_PASSWORD=password
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync
In my local environment it works fine so its probably not an issue with my code. Are there some configuration settings am missing? I have deployed sites before with the same method and I have never encountered this issue. The only difference is that this site uses domain routing.
The problem was newrelic agent. So I uninstalled it from my staging server. This is a temporary solution as I need the agent in production. More on this: Laracasts Forum