Laravel 4 php工匠迁移不起作用

Lyn*_*ynx 1 php laravel laravel-4 cartalyst-sentry

我正在尝试遵循有关数据库基础知识的教程,我正处于设置Sentry 2的过程中.我按要求添加了所有异常.但是在Sentry 2网站上的文档页面的第四步.我收到以下错误

{"error":{"type":"ErrorException","message":"Undefined index: collation","file":"\/var\/www\/db_test\/vendor\/laravel\/framework\/src\/Illuminate\/Database\/Connectors\/MySqlConnector.php","line":22}}
Run Code Online (Sandbox Code Playgroud)

我尝试了一些东西,如我的ssh屏幕中所述,但没有:

    robert@Devlopement:/var/www/db_test$ php composer.phar update
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing cartalyst/sentry (dev-master 9a8221d)
    Downloading: 100%

Writing lock file
Generating autoload files
Generating optimized class loader
Compiling common classes
robert@Devlopement:/var/www/db_test$ php artisan key:generate
Application key [Dabb88Fw5080yq53cYgyprredmPbVBpK] set successfully.
robert@Devlopement:/var/www/db_test$ php artisan migrate --package=cartalyst/sentry
{"error":{"type":"ErrorException","message":"Undefined index: collation","file":"\/var\/www\/db_test\/vendor\/laravel\/framework\/src\/Illuminate\/Database\/Connectors\/MySqlConnector.php","line":22}}robert@Devlopement:/var/www/db_test$ phptrytisan migrate --package=cartalyst/sen
{"error":{"type":"ErrorException","message":"Undefined index: collation","file":"\/var\/www\/db_test\/vendor\/laravel\/framework\/src\/Illuminate\/Database\/Connectors\/MySqlConnector.php","line":22}}robert@Devlopement:/var/www/db_test$ ^C
robert@Devlopement:/var/www/db_test$ 
Run Code Online (Sandbox Code Playgroud)

我谷歌问题,似乎这是一个问题,假设在测试版中解决.有任何想法吗?

小智 5

您的数据库配置已损坏.在app/config/database.php中是已配置数据库的列表.您的配置中很可能缺少"排序规则".