I need to install a laravel package in an Octobercms plugin, but it’s not giving me an error.
Composer.json:
"license": "MIT",
"require": {
"akaunting/laravel-money": "dev-master"
},
Plugin.php
public function register(){
$this->app->register(Akaunting\Money\Provider::class);
}
Result
Class "Akaunting\Money\Provider" not found
daft
#2
Hi @Hatalias
Everything looks ok. Composer is responsible for autoloading classes. So there may be some misconfiguration here if it says it cannot find the class.
Hi, I think the problem was with that package, I tried this php/money and I got it! thanks!
Is there maybe a typo? I think there is a backslash missing (), i.e. instead of
public function register(){
$this->app->register(Akaunting\Money\Provider::class);
}
write \Akaunting
:
public function register(){
$this->app->register(\Akaunting\Money\Provider::class);
}