I struggled with this issue for a while.
Turns out, my issue was in a config file. One of my config classes was calling a static method with a bug in it.
The way I found it was to add echo statements in the following 2 files:
vendor/laravel/framework/src/Illuminate/Container.php
To echo the classes the container is building.
/**
* Instantiate a concrete instance of the given type.
*
* @param string $concrete
* @return mixed
*
* @throws \Illuminate\Contracts\Container\BindingResolutionException
*/
public function build($concrete)
{
// If the concrete type is actually a Closure, we will just execute it and
// hand back the results of the functions, which allows functions to be
// used as resolvers for more fine-tuned resolution of these objects.
if ($concrete instanceof Closure) {
return $concrete($this, $this->getLastParameterOverride());
}
echo 'Build - ' . $concrete . PHP_EOL;
$reflector = new ReflectionClass($concrete);
and here.
vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguratio n.php
To echo the config classes being loaded.
/**
* Load the configuration items from all of the files.
*
* @param \Illuminate\Contracts\Foundation\Application $app
* @param \Illuminate\Contracts\Config\Repository $repository
* @return void
* @throws \Exception
*/
protected function loadConfigurationFiles(Application $app, RepositoryContract $repository)
{
$files = $this->getConfigurationFiles($app);
if (! isset($files['app'])) {
throw new Exception('Unable to load the "app" configuration file.');
}
foreach ($files as $key => $path) {
echo 'config - ' .$key . PHP_EOL;
$repository->set($key, require $path);
}
}
composer.lock
andvendor
directory, then runcomposer install
and test again. – HomesteaderRequest
reference in your action like thispublic function index(Request $request)
, for this you need to importuse Illuminate\Http\Request;
– Biocatalyst