Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/239.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 找不到基表或视图:1146表';username.gallery#u images';_Php_Database_Laravel_Laravel 4 - Fatal编程技术网

Php 找不到基表或视图:1146表';username.gallery#u images';

Php 找不到基表或视图:1146表';username.gallery#u images';,php,database,laravel,laravel-4,Php,Database,Laravel,Laravel 4,当我创建一个帖子并试图从我设置的脚手架上保存它时,我遇到了一个问题。下面是要查看代码的粘贴: 我已在我的应用程序中使用此软件包: 它似乎试图保存帖子,但当涉及到数据库时,它会抛出以下错误: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'markdunbavan.gallery_images' doesn't exist (SQL: insert into `gallery_images` (`photo_file_name`

当我创建一个帖子并试图从我设置的脚手架上保存它时,我遇到了一个问题。下面是要查看代码的粘贴:

我已在我的应用程序中使用此软件包:

它似乎试图保存帖子,但当涉及到数据库时,它会抛出以下错误:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'markdunbavan.gallery_images' doesn't exist (SQL: insert into `gallery_images` (`photo_file_name`, `photo_file_size`, `photo_content_type`, `photo_updated_at`, `post_id`, `updated_at`, `created_at`) values (1.png, 34584, image/png, 2014-02-01 15:24:54, , 2014-02-01 15:24:54, 2014-02-01 15:24:54))
我想看看可能是什么,但我遇到了麻烦

有人能帮忙吗


干杯

数据库中不存在表格gallery_图像markdunbavan这种错误的一个奇怪问题是,有时我只是更改模型的名称,一切正常。还可以尝试其他可用的方法,如insert或create insert save。

好的,我添加了迁移,但由于某些原因,当我执行php artisan迁移时,数据库中没有添加任何内容