调用未定义的方法Illuminate \ Support \ Facades \ Schema :: isDeferred()

时间:2020-08-13 02:07:42

标签: laravel-5 facade laravel-facade

我正在尝试在项目中运行任何推荐的php artisan,但每次尝试加载时我都无法每次尝试找到此错误

    In ProviderRepository.php line 149:
    
      Call to undefined method Illuminate\Support\Facades\Schema::isDeferred()

Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1

我不知道会发生什么,我在配置文件中定义数据库,也在AppServiceProvider中定义了以下数据库

<?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Schema;//to define class schema

class AppServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        Schema :: defaultStringLength(191);  //add when php artisan migrate pass error after used defult auth
    }

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

我正在使用php和laravel版本:

"require": {
    "php": "^7.1.3",
    "fideloper/proxy": "^4.0",
    "laraform/laraform-laravel": "^1.2",
    "laravel/framework": "5.7.*",
    "laravel/tinker": "^1.0"
},

0 个答案:

没有答案
相关问题