解决 Class not found和Base table or view not found: 1051 问题

简介: 1、解决class not found的方法: 如果你用的是homestead虚拟机,那么,你要到虚拟机下执行: composer dump-autoload 2、解决Base table or view not found: 1051的方法 mysql> drop database hom...

1、解决class not found的方法:

如果你用的是homestead虚拟机,那么,你要到虚拟机下执行:

composer dump-autoload

2、解决Base table or view not found: 1051的方法

mysql> drop database homestead;

mysql> create database homestead;

php artisan migrate

 

总结:当我用1的方法解决了1问题的时候,之后又出现了2的问题,然后再用2的方法解决了!!!

参考:

http://stackoverflow.com/questions/32417358/laravel-5-1-migration-error

https://laravel.com/docs/5.2/migrations#running-migrations

目录
相关文章
|
Java Maven Spring
|
8月前
SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘thinkphp.test‘ don‘t exsit
SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘thinkphp.test‘ don‘t exsit
161 0
|
2月前
|
Linux
报错 Package ‘oniguruma‘, required by ‘virtual:world‘, not found
报错 Package ‘oniguruma‘, required by ‘virtual:world‘, not found
156 0
【已解决】Error: Element type is invalid: expected a string (for built-in components) or a class/function
Error: Element type is invalid: expected a string (for built-in components) or a class/function
2479 0
【已解决】Error: Element type is invalid: expected a string (for built-in components) or a class/function
|
2月前
|
Java
Error:(15, 13) java: No property named “id” exists in source parameter(s). Did you mean “null”?
Error:(15, 13) java: No property named “id” exists in source parameter(s). Did you mean “null”?
69 1
Error:(15, 13) java: No property named “id” exists in source parameter(s). Did you mean “null”?
Error:(15, 13) java: No property named “id” exists in source parameter(s). Did you mean “null”?
|
Java 数据安全/隐私保护
Failed to register native method nativeSetStatusCallback in base.apk
Failed to register native method nativeSetStatusCallback in base.apk
213 0
Target class [Admin\LoginController] does not exist.
Laravel 8配置好路由后,访问提示:Target class [XXXXXController] does not exist.错误。出现这个错误的原因是Laravel8对路由命名空间做出了更新(详见:路由命名空间更新),而我们仍然在使用Laravel6或者7版本的方式写路由。 Laravel 8路由配置方式: use App\Http\Controllers\LoginController; Route::get('login', [LoginController::class, 'index']);
How to find unit test class by code
Created by Wang, Jerry, last modified on Dec 20, 2014
How to find unit test class by code
demo4 debug - create class instance - component works as type
Created by Wang, Jerry, last modified on Feb 23, 2016
103 0
demo4 debug - create class instance - component works as type