Laravel 几个出错的解决方法
Specified key was too long; max key length is 767 bytes
执行
| 
					 1  | 
						php artisan migrate  | 
					
出错
| 
					 1  | 
						Illuminate\Database\QueryException  : SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table `users` add unique `users_email_unique`(`email`))  | 
					
解决
编辑 app/Providers/AppServiceProvider.php 文件,修改为
| 
					 1 2 3 4 5 6  | 
						use Illuminate\Support\Facades\Schema; public function boot() {     Schema::defaultStringLength(191); }  | 
					
Class SettingsTableSeeder does not exist
执行
| 
					 1  | 
						php artisan db:seed  | 
					
出错
| 
					 1  | 
						ReflectionException  : Class SettingsTableSeeder does not exist  | 
					
解决
| 
					 1 2  | 
						composer dump-autoload php artisan db:seed  | 
					
Know More
https://learnku.com/articles/4195/laravel-54-common-error-specified-key-was-too-long
https://stackoverflow.com/questions/26143315/laravel-5-artisan-seed-reflectionexception-class-songstableseeder-does-not-e
There are no comments yet