简体   繁体   English

类CreateTableName找不到php artisan

[英]Class CreateTableName Not found php artisan

when i typed in console - php artisan make:migration create_website_table --create=website 当我在控制台中键入时php artisan make:migration create_website_table --create=website

than file created, I didn't edit anything and ran command php artisan migrate 比创建的文件要多,我没有编辑任何内容,而是运行了php artisan migrate命令

now i want to rollback it and it says 现在我想回滚它,它说

[Symfony\\Component\\Debug\\Exception\\FatalErrorException] [Symfony的\\元器件\\调试\\异常\\ FatalErrorException]
Class 'CreateWebsiteTable' not found 找不到类“ CreateWebsiteTable”

The code of my migration Website class 我的迁移网站课程的代码

<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateWebsiteTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('website', function (Blueprint $table) {
            $table->increments('id');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('website');
    }
}

Maybe there is some namespaces? 也许有一些名称空间?

Before you run php artisan migrate , run the following code composer dump-autoload . 在运行php artisan migrate之前,请运行以下代码composer dump-autoload

Infact, whenever you get ClassNotFound Exception, run the above command! 实际上,每当您收到ClassNotFound Exception时,请运行以上命令!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 php artisan migrate:找不到类架构 - php artisan migrate: Class Schema not found 鲁门班工匠没有找到 - Lumen class Artisan not found 找不到php artisan make:controller错误类Rout - php artisan make:controller error class Rout not found 使用 php artisan tinker 时找不到类 Psy/ShellOutput - Class Psy/ShellOutput not found when using php artisan tinker 运行php Artisan db:seed时未找到Laravel 5类DatabaseSeeder - Laravel 5 class DatabaseSeeder not found when running php Artisan db:seed 在Laravel中找不到PHP artisan的类&#39;Laraveldaily \\ Quickadmin \\ QuickadminServiceProvider&#39; - Class 'Laraveldaily\Quickadmin\QuickadminServiceProvider' not found for php artisan in Laravel Laravel Artisan命令-“找不到类” - Laravel Artisan command - “Class not found” php artisan serve not working ProviderRepository.php line 208:Class'Laravelium not found\Sitemap\SitemapServiceProvider' - php artisan serve not working giving error In ProviderRepository.php line 208:Class 'Laravelium\Sitemap\SitemapServiceProvider' not found 运行php artisan db:seed后在laravel中找不到类“ App \\ Eloquent” - Class 'App\Eloquent' not found in laravel after running php artisan db:seed 在Laravel 5中找不到“App \\ Http \\ Controllers \\ Artisan”类 - Class 'App\Http\Controllers\Artisan' not found in Laravel 5
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM