MirShaon/Forum-Advanced

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'blog.channels' doesn't exist (SQL: select * from `channels`)

aboutsam opened this issue · 5 comments

When i run "composer install" i got this error message:

Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover


  [Illuminate\Database\QueryException]
  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'blog.channels' d
  oesn't exist (SQL: select * from `channels`)



  [PDOException]
  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'blog.channels' d
  oesn't exist


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

In database folder the file with name "2017_11_10_130554_create_channels_table.php" exists.

please update your composer then try it, it will resolve your problem.

it is a tedious process but try and delete all the models and recreate them again and copy the relevant code to the relevant models and also add the same data to the database migrations. that should work. dont know why artisan is misbehaving

Can you please update your composer? then let me know.

Hi all, the error happens because this line in the AppServiceProvider.php

View::share('channels', Channel::all());

just comment it out .. php artisan migrate .. then uncomment it.

Happy coding!