In-Touch / laravel-newrelic

Laravel NewRelic ServiceProvider
173 stars 48 forks source link

[Request] Enable/Disable based upon environment config. #39

Closed kyranb closed 7 years ago

kyranb commented 8 years ago

It'd be great to conditionally load the service provider based on an environment variable, that way avoiding the

 [BadMethodCallException]
  Method after does not exist.

error that shows up when this is installed without the New Relic PHP agent being installed.

pleckey commented 8 years ago

@kyranb You should be able to handle this with the throw_if_not_installed config param: https://github.com/In-Touch/laravel-newrelic/blob/master/src/config/config.php#L40

Is that not working for you?

kyranb commented 8 years ago

@pleckey Yeap, set to false and still getting the above error when running php artisan.

Jalle19 commented 7 years ago

This should be closed as it's no longer an issue.