简体   繁体   English

SQLSTATE[42S02]: 未找到基表或视图:1146 表 'laravel9rentalcars.categories' 不存在

[英]SQLSTATE[42S02]: Base table or view not found: 1146 Table 'laravel9rentalcars.categories' doesn't exist

this what laravel give me when iam execute my laravel "code" what can i do?当我执行我的 laravel“代码”时,laravel 给我什么,我该怎么办? enter image description here在此处输入图像描述

Debug:调试:

  1. Your Table exist or not你的表存在与否
  2. If Table not exists then Run migration php artisan migrate如果表不存在则运行迁移php artisan migrate
  3. Check you have selected right DB检查您是否选择了正确的数据库

Share more information like screenshot and what you have tried.., etc分享更多信息,例如屏幕截图和您尝试过的内容等

First, check DB_DATABASE in your.env file or database.php in the config folder for the right DB name.首先,检查您的 .env 文件中的 DB_DATABASE 或配置文件夹中的 database.php 以获取正确的数据库名称。 if it is ok, then check whether the categories table exists in the databases directory or not (even check the spelling).如果可以,则检查数据库目录中是否存在类别表(甚至检查拼写)。 if it is not, you may create the table by running this command:如果不是,您可以通过运行以下命令来创建表:

php artisan make:migration create_categories_table --create=categories

and then然后

php artisan migrate

check categories table, if exist then check actual query.检查类别表,如果存在则检查实际查询。

暂无
暂无

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

相关问题 SQLSTATE[42S02]:未找到基表或视图:1146 表 '***.indices' 不存在 laravel - SQLSTATE[42S02]: Base table or view not found: 1146 Table '***.indices' doesn't exist laravel SQLSTATE [42S02]:未找到基表或视图:1146 表“laravel_abonamenty2.currencies”不存在 - SQLSTATE[42S02]: Base table or view not found: 1146 Table 'laravel_abonamenty2.currencies' doesn't exist SQLSTATE [42S02]:未找到基表或视图:1146表X不存在 - SQLSTATE[42S02]: Base table or view not found: 1146 Table X doesn't exist SQLSTATE[42S02]:未找到基表或视图:1146 Laravel 5.2 上不存在表“db_wls.users” - SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db_wls.users' doesn't exist on laravel 5.2 Laravel-[PDOException] SQLSTATE [42S02]:找不到基本表或视图:1146表'ip.priorities'不存在 - Laravel - [PDOException] SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ip.priorities' doesn't exist SQLSTATE [42S02]:找不到基表或视图:1146表'sf_sandbox.phpcr_workspaces'不存在 - SQLSTATE[42S02]: Base table or view not found: 1146 Table 'sf_sandbox.phpcr_workspaces' doesn't exist SQLSTATE[42S02]:未找到基表或视图:1146 表“My_database_Name.posts”不存在 - SQLSTATE[42S02]: Base table or view not found: 1146 Table 'My_database_Name.posts' doesn't exist SQLSTATE[42S02]:未找到基表或视图:1146 表 'hr.staff' 不存在 - SQLSTATE[42S02]: Base table or view not found: 1146 Table 'hr.staff' doesn't exist SQLSTATE [42S02]:找不到基表或视图:1146表'pdone.BaseUser'不存在 - SQLSTATE[42S02]: Base table or view not found: 1146 Table 'pdone.BaseUser' doesn't exist SQLSTATE [42S02]:未找到基表或视图:1146 表 'basic.posts' 不存在 - SQLSTATE[42S02]: Base table or view not found: 1146 Table 'basic.posts' doesn't exist
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM