This is not a Laravel package, so you do not have a Service Provider or Alias ββto configure, but it is a PHP package, and since you use Composer to install it, it is already loaded automatically, so you can simply:
Add the package to your composer.json:
{
"require": {
"ghunti/highcharts-php": "~2.0"
}
}
Run
composer dumpautoload
And create an instance:
$chart = new Ghunti\HighchartsPHP\Highchart();
Or use it at the top of your php:
use Ghunti\HighchartsPHP\Highchart;
And you should be able to:
$chart = new Highchart(Highchart::HIGHSTOCK);
Anywhere in your project and it should work.
You can create an alias in app/config/app.phpfor it if you prefer to use it as follows:
'Highchart' => 'Ghunti\HighchartsPHP\Highchart'
But you still have to create it
$chart = new Highchart();
You will not be able to use it, as in Laravel
Highchart::doWhatever();
If you yourself do not create a ServiceProvider,
source
share