大前端
-
在 Laravel 6 的模块中,数据库迁移的回滚(提示:Migration not found)与重新迁移
1、发现 Git 库中,数据库迁移文件,有了一些变更,如:字段 mine_type 修改为 mime_type。如图1 图1 2、2 个数据库迁移文件,恰好在最后一次迁移中。如图2 图2 3、回滚迁移,如果要回滚最后一次迁移操作,可以使用…
-
在 Laravel Framework 6.20.40、nuwave/lighthouse v5.33.1 中,报错:Argument 1 passed to App//Exceptions//Handler::report() must be an instance of Exception, instance of TypeError given, called in E://wwwroot//wshop//platform//vendor//nuwave//lighthouse//src//Execution//ReportingErrorHandler.php on line 39
1、执行请求:”query”: “query{ onlineStoreTheme(themeId: “vogue”){ id editable createdAt publishAt } }”, 时,响应 Argument 1 passed to App//Exceptions//Handler::rep…
-
在 Laravel 8 中参考 igaster / laravel-theme 示例实现
1、在本地使用 Composer 来创建一个新的 Laravel 项目:laravel-theme-demo。 PS E:/wwwroot> composer create-project laravel/laravel laravel-theme-demo Creating a "laravel/laravel" project at…
-
使用 Lighthouse 构建 GraphQL 服务器的入门,从零开始为一个简单博客创建 GraphQL API
1、使用 Lighthouse 构建 GraphQL 服务器的入门。参考网址:https://lighthouse-php.cn/tutorial/ 2、从零开始为一个简单博客创建 GraphQL API。通过 Composer 创建一个新的 Laravel 项目:lighthouse-tutorial PS …
-
执行 composer require 时,报错:[Composer/Downloader/TransportException] curl error 6 while downloading https://api/v4/projects/%2Fnova: Could not resolve host: api
1、执行 composer require 时,报错:[Composer/Downloader/TransportException] curl error 6 while downloading https://api/v4/projects/%2Fnova: Could not resolve host: api 。如图1 图1 PS E:/wwwroot/wshop…
-
在 Laravel 6 中,执行命令:php artisan telescope:publish,报错:Unable to locate publishable resources. Publishing complete
1、在 Laravel 6 中,执行命令:php artisan telescope:publish,报错:Unable to locate publishable resources. Publishing complete。如图1 图1 PS E:/wwwroot/wshop/platform> php artisan telescope:publis…
-
在 Laravel 6 中报错:LOG.error: This cache store does not support tagging. {“exception”:{}}
1、在 Laravel 6 中报错:LOG.error: This cache store does not support tagging. {“exception”:{}}。如图1 图1 2、查看日志文件,/storage/logs/laravel-2022-01-11.log [2022-01-11 09:51:45] local…
-
添加外键约束时报错: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails
1、添加外键约束时报错: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails 。如图1 图1 PS E:/wwwroot/larabbs> php artisan migrat…
-
执行命令:php artisan larabbs:calculate-active-user 时,报错:Class ‘Redis’ not found
1、执行命令:php artisan larabbs:calculate-active-user 时,报错:Class ‘Redis’ not found。如图1 图1 PS E:/wwwroot/larabbs> php artisan larabbs:calculate-active-user 开始计算... Error C…
-
在 Windows 10 宿主机中运行 MailHog ,方便我们开发 Laravel 时对邮件发送的监控
1、在 Windows 10 中安装 MailHog ,方便我们开发 Laravel 时对邮件发送的监控。原因在于开发环境是本地主机环境,并非 Homestead 或者 Docker 。打开网址:https://github.com/mailhog/MailHog 。 2、选择 MailHog…