Suggested at https://laravel-news.com/laravel-5-4-key-too-long-error
This commit is contained in:
James Brooks
2017-07-08 11:01:22 +01:00
parent 62503fd8fd
commit 44de01b123

View File

@@ -15,6 +15,7 @@ use AltThree\Bus\Dispatcher;
use CachetHQ\Cachet\Bus\Middleware\UseDatabaseTransactions;
use CachetHQ\Cachet\Services\Dates\DateFactory;
use Illuminate\Database\Eloquent\Relations\Relation;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Str;
@@ -34,6 +35,8 @@ class AppServiceProvider extends ServiceProvider
*/
public function boot(Dispatcher $dispatcher)
{
Schema::defaultStringLength(191)
$dispatcher->mapUsing(function ($command) {
return Dispatcher::simpleMapping($command, 'CachetHQ\Cachet\Bus', 'CachetHQ\Cachet\Bus\Handlers');
});