Answers for "ERROR 1071"

PHP
0

error 1071 laravel

- Open = app/Providers/AppServiceProvider.php
- add = use Illuminate\Support\Facades\Schema;
- add in method boot() = Schema::defaultStringLength(191);

Example:

<?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Schema;

class AppServiceProvider extends ServiceProvider
{
    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        //
    }

    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        Schema::defaultStringLength(191);
    }
}
Posted by: Guest on October-24-2021

Code answers related to "ERROR 1071"

Browse Popular Code Answers by Language