I'm trying to inject LogManager into my Lumen's controller but I'm getting:
{
"message": "Unresolvable dependency resolving [Parameter #0 [ <required> $app ]] in class Illuminate\Log\LogManager",
"status_code": 500
}
Injecting DatabaseManager works with no issues whatsoever.
class PackageController extends ApiController
{
private $databaseManager;
private $logManager;
private $packageService;
public function __construct(
DatabaseManager $databaseManager,
LogManager $logManager,
PackageServiceInterface $packageService
) {
$this->databaseManager = $databaseManager; <- works
$this->logManager = $logManager; <- error
$this->packageService = $packageService; <- works
}
Do I have to add something into bootstrap/app.php
for logs? I don't want to use facades in my controllers.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…