Mysql 在laravel中的PHP artisan迁移中出错
我总是使用laravel项目,从laravel 4到7。但这是我第一次在新下载的laravel中迁移数据库时遇到错误。这是我创建时的错误Mysql 在laravel中的PHP artisan迁移中出错,mysql,laravel,host,Mysql,Laravel,Host,我总是使用laravel项目,从laravel 4到7。但这是我第一次在新下载的laravel中迁移数据库时遇到错误。这是我创建时的错误 $e = $event->getThrowable(); if (!$event->hasResponse()) { $this->finishRequest($request, $type); throw $e; } $re
$e = $event->getThrowable();
if (!$event->hasResponse()) {
$this->finishRequest($request, $type);
throw $e;
}
$response = $event->getResponse();
// the developer asked for a specific status code
if (!$event->isAllowingCustomResponseCode() && !$response->isClientError() && !$response->isServerError() && !$response->isRedirect()) {
// ensure that we actually have an error response
if ($e instanceof HttpExceptionInterface) {
// keep the HTTP status code and headers
$response->setStatusCode($e->getStatusCode());
$response->headers->add($e->getHeaders());
} else {
$response->setStatusCode(500);
}
}
try {
return $this->filterResponse($response, $request, $type);
} catch (\Exception $e) {
return $response;
}
}
/**
* Returns a human-readable string for the specified variable.
*/
private function varToString($var): string
{
if (\is_object($var)) {
return sprintf('an object of type %s', \get_class($var));
}
if (\is_array($var)) {
$a = [];
foreach ($var as $k => $v) {
$a[] = sprintf('%s => ...', $k);
}
return sprintf('an array ([%s])', mb_substr(implode(', ', $a), 0, 255));
}
if (\is_resource($var)) {
return sprintf('a resource (%s)', get_resource_type($var));
}
if (null === $var) {
return 'null';
}
if (false === $var) {
return 'a boolean value (false)';
}
if (true === $var) {
return 'a boolean value (true)';
}
if (\is_string($var)) {
return sprintf('a string ("%s%s")', mb_substr($var, 0, 255), mb_strlen($var) > 255 ? '...' : '');
}
if (is_numeric($var)) {
return sprintf('a number (%s)', (string) $var);
}
return (string) $var;
}
}
错误
我被困在这里了。但在此之前,我从IIS管理器启动IIS。我不知道这是否会起作用。我之所以启用它,是因为我在自己的终端上运行了一个c#web应用程序
请帮我解决这个问题。看来这是作曲家的问题。只需尝试运行以下bash脚本:
composer dump-autoload
composer dump-autoload