1
votes

I have just cloned a Laravel project. I tried to run composer install and php artisan migrate but both return this error

> Illuminate\Foundation\ComposerScripts::postAutoloadDump

> @php artisan package:discover

In Connection.php line 664:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'name.system_functions' doesn't exist (SQL: select * from system_functions where name = test limit 1)

In Connection.php line 326:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'name.system_f
unctions' doesn't exist

I use MySQL and Sequel Pro has already created database for this project.

Schema::create('system_functions', function (Blueprint $table) {
        $table->increments('id');
        $table->string('name',64);
        $table->integer('group_id')->unsigned();
        $table->boolean('is_active');
        $table->timestamps();
    });

Data in this table is created by database seeding. I have tried php artisan db:seed will return this error too.

2
Check your database setting and share the project link that you have cloned.Sehdev
php artisan config:clear then run againsta

2 Answers

1
votes

Try run composer dump-autoload before running composer install and php artisan migrate

1
votes

Solution 1

try composer global update or composer self-update

Solution 2

composer dump-autoload works fine but after running dump-autoload it tries to run scripts written in scripts.post-autoload-dump array in composer.json file, but composer is not able to run script with @ symbol in composer.json file. In order to get rid over this warning run

composer dump-autoload --no-scripts

And if you want to get rid of it permanently then remove script with @ post-autoload-dump": [] from your composer.json file.

reference