Search code examples
laraveleasypost

Easy Post API with Laravel


I am trying to use EasyPost with Laravel, but I don't know how to use it in laravel. I try to use it on my controller but I get an error

require_once("path/to/vendor/autoload.php");
\EasyPost\EasyPost::setApiKey('cueqNZUb3ldeWTNX7MU3Mel8UXtaAMUi');

Solution

  • if you running this in your laravel application and installed this via composer the autoloading should be already active.. you can remove that require_once line