I'm a Laravel newbie. I'm working with a package called Confide. It has an error which I'm trying to identify using the Log function. When I call the Log function I get an exception
Class 'Zizaco\Confide\Log' not found
when I include use Illuminate\Log;
I get an error message
Class 'Illuminate\Log' not found
What am I doing wrong? I have run composer dump-auto -o
but there is no change
Here is a section of my code
<?php namespace Zizaco\Confide;
use Illuminate\Log;
use Illuminate\View\Environment;
use Illuminate\Config\Repository;
use InvalidArgumentException;
use Zizaco\Confide\ObjectProvider;
class Confide
{
and the code that causes an error is:
Log::info('The value is '.$token);
You have to use just Log:
use Log;
Because this is not the class, but the Log Facade.
It looks like Illuminate\Log
is a namespace, not a class.
See the Laravel API here: http://laravel.com/api/namespace-Illuminate.Log.html
Laravel uses Monolog, and creates a Log facade to it. You should be able to simply use use Log;
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With