Try running php artisan migrate.
Mar 31, 2016
7
Level 10
Base table or view not found: 1146 Table doesn't exist
I followed this tutorial and started to build an application ( https://github.com/nasirkhan/laravel-5-starter-application ). but the problem is when i try to create a new instance from this project it shows an error and could not complete the installation. i run composer install and the error was following,
[Illuminate\Database\QueryException]
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'laravel-5-starter.permissions' doesn't exist (SQL: select * from `permissions`)
[PDOException]
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'laravel-5-starter.permissions' doesn't exist
Script php artisan clear-compiled handling the post-install-cmd event returned with an error
[RuntimeException]
Error Output:
install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--] [<packages>]...
Level 47
It may be because of the way you registered the AuthServiceProvider. Try changing out the getPermissions method with this one:
protected function getPermissions()
{
try {
return Permission::with('roles')->get();
} catch (\Exception $e) {
return [];
}
}
13 likes
Please or to participate in this conversation.