1071 Specified key was too long; max key length is 1000 bytes
use Illuminate\Support\Facades\Schema;
public function boot()
{
Schema::defaultStringLength(191);
}
use Illuminate\Support\Facades\Schema;
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
Schema::defaultStringLength(191);
}
In app\Providers\AppServiceProvider.php File
// Add
use Illuminate\Support\Facades\Schema;
public function boot() {
// Add In boot function
Schema::defaultStringLength(191);
}
# AppServiceProvider.php
use Illuminate\Support\Facades\Schema;
public function boot()
{
Schema::defaultStringLength(191);
}
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
Also in PHP:
- date time from timestamp php
- execute query and use die in php
- clear command in laravel
- execution time exentd php
- check if a substring exists in string php
- date du joure n php
- composer install laravel latest version
- Parse error</b>: syntax error, unexpected ':', expecting ';' or '{' in <b>//twilio-php-master/src/Twilio/autoload.php</b> on line <b>61</b><br />
- doctrine fixture bundle
- display files with php
- create random string and number with laravel
- convert touppercase php
- /DependencyResolver/Solver.php on line 223
- array if key exist php
- decode_id php
- database seeding in laravel
- explode a number php
- clear cache laravel in server
- check all file in server php
- check if keys exists array php
- check current pages is a child page wordpress
- composer create-project laravel/laravel 8
- How to pass form variables on all pages laravel helpers
- @ in php to supress error in php