Syntax error or access violation: 1071 Specified key was too long
use Illuminate\Support\Facades\Schema;
public function boot()
{
Schema::defaultStringLength(191);
}
//add/edit the following into app/Providers/AppServiceProviders.php:
use Illuminate\Support\Facades\Schema;
function boot()
{
Builder::defaultStringLength(191); // Update defaultStringLength
}'charset' => 'utf8',
'collation' => 'utf8_unicode_ci','charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
Also in PHP:
- confirm length of string in php
- apply soft delete by custom laravel
- base64 decode php function
- enable php errors for file folder
- check php for errors
- create new project in laravel 7 using composer
- date_format() in php
- crete new project in laravel
- change max_execution_time php
- Upload image laravel 6
- 17th date in php
- file_get_contents(): SSL: Network is down
- calculate total time from start and end datetime in php
- check current pages is a child page wordpress
- codeigniter
- composer install laravel installer
- PHP date('H')
- eliminate duplicate values from associative array phph
- check if key exists in dictionary php
- eloquent model sort by ascending order
- clear cache artisan laravel
- db seeder laravel 5
- enable php errors
- copy file path in phpstorm