I have exactly the same problem, I've been working for 3 hours to solve it, but can't figure out how to solve it. If you found a solution, please share your answer, I will do the same.
If anyone else can help us, it would be appreciated.
Adding the following lines in bootstrap/autoload.php worked for me. I don't know if it's a good solution, but for now it's working and I can continue developing my packages.
/*
|--------------------------------------------------------------------------
| Register The Workbench Loaders
|--------------------------------------------------------------------------
|
| The Laravel workbench provides a convenient place to develop packages
| when working locally. However we will need to load in the Composer
| auto-load files for the packages so that these can be used here.
|
*/
if (is_dir($workbench = __DIR__.'/../workbench'))
{
Illuminate\Workbench\Starter::start($workbench);
}
Thanks! It worked for me too. Somehow it was removed from that autoload file. Now I can continue. :)
My problem cant be resolved by adding the above code!
I resolve the problem by copy the LogServiceProvider Class from an old vendor directory installarion. The problem occours whem I install a fresh new installation of Laravel. It seems like the "LogServiceProvider" Class is not avaliable in Laravel 5 new installations. BUG? Please, correct me if I am wrong.
This is the file that I copied from my old Laravel 5 installation: vendor/laravel/frameword/src/Illuminate/Log/
<?php namespace Illuminate\Log;
use Monolog\Logger;
use Illuminate\Support\ServiceProvider;
class LogServiceProvider extends ServiceProvider {
/**
* Indicates if loading of the provider is deferred.
*
* @var bool
*/
protected $defer = true;
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
$this->app->instance(
'log', new Writer(new Logger($this->app['env']), $this->app['events'])
);
$this->app->bind('Psr\Log\LoggerInterface', function()
{
return $this->app['log']->getMonolog();
});
}
/**
* Get the services provided by the provider.
*
* @return array
*/
public function provides()
{
return ['log', 'Psr\Log\LoggerInterface'];
}
}
The solution was install a fresh new installation again. Like Graham Campbell says in the follow link:
I faced a similar problem, Uploading the vendor/composer folder to the server worked for me !
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community