问题标签 [laravel-5.7]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
php - Laravel 5.7,预设引导错误。无法打开流
我正在尝试使用 laravel 5.7 bootstrap4 预设,但使用它时遇到问题。你们知道为什么我看到这个错误吗?为什么文件丢失?我没有改变任何东西的路径。
json - laravel guzzle 读取数据库而不是 json
我在 localhost 上有 2 个 laravel 项目(正在开发中):
第一个(project1.test)在检查数据库行后返回 api json:
另一个调用上述函数的项目(project2.test),我安装了 guzzle
我开辟了新路线:
在上面的代码中,我在 project2.test 中遇到了这个消息:
但是在验证功能中,如果我取消注释第一行并注释查询,它工作正常。
注意:我在邮递员中对其进行了测试,它工作正常。
我该如何解决这个问题?
问候, 萨米
php - Laravel 5.7.6 Email Authentication
I recently Installed the latest version of Laravel & used the docs to create Email Verification that comes out of the box with laravel according to this : https://laravel.com/docs/5.7/verification however, when I receive the email and click on it I face with a 403 forbidden
page.
I have searched the web and did not find an answer to this problem. Please let me know if you need more information to help me with the issue.
Note:
My problem is not related to https://github.com/laravel/framework/pull/25723. I have checked the links & the generated tokens & they are fine.
php - Laravel 5.7 类 App\Http\Controllers\Auth\SendsPasswordResetEmails 不存在
我正在尝试使用 Laravel 5.7 中的内置函数来实现重置密码功能,因为我已经在我的web.php
. 我试着跑步php artisan route:list
,它给了我一个例外
更新
很抱歉提供的信息不足。我之前已经运行过该命令php artisan make:auth
,并且Auth::routes()
已经在web.php
我试图通过我的特征访问函数resets
中定义,但它给出了一个异常ResetPasswords
ResetPasswordController
类 App\Http\Controllers\ResetPasswordController 不存在
我正在使用位于 App\Http\Controllers\Auth\ResetPasswor.php 的预定义控制器
重置密码控制器
网页.php
laravel - 在 1 次调用中创建具有多个关系的项目
所以我有一个项目表:
我有一个小时表:
现在,是否可以在一次调用中同时创建与 project_id 和 user_id 的关联?
我知道我可以执行以下操作(将 user_id 添加到小时数):
但我正在尝试做这样的事情:
两者user
和project
在他们的课程中具有相同的小时关系:
这可能吗,如果可以,我将如何去做?
php - yajra/laravel-datatables 搜索不适用于 laravel 5.7
这是加入代码并分配Datatables
这是jQuery代码
现在,当我尝试搜索某些内容时,它会提示我出现错误这是一条错误消息
异常消息:↵↵SQLSTATE [42000]:语法错误或访问冲突:1583 调用本机函数“LOWER”中的参数不正确(SQL:选择计数(*)作为聚合来自(选择“1”
row_count
作为producto
内部e
连接marca
作为d
one
.cod_marca
=d
.cod_marca
内部连接tipo-producto
asj
one
.cod_tipo_producto
=j
.cod_tipo_producto
where (LOWER(producto
ase.cod_producto
) LIKE %1% or LOWER(producto
ase.nom_producto
) LIKE %1% or LOWER(producto
ase.precio_venta
) LIKE %1% or LOWER(marca
.nombre
) LIKE %1% or LOWER (tipo-producto
.nombre
) LIKE %1% 或 LOWER(producto
ase.estado
) LIKE %1%)) count_row_table)
laravel - ERR_TOO_MANY_REDIRECTS - Laravel 5.7
我正在使用 laravel 5.7。我有一个用户表,其中有一列 user_type
另一列是布尔值 is_premium,它返回真或假。
我为管理员创建了一个中间件
我已经在 routes/web.php 文件中使用它作为
当我访问管理仪表板路线时,它说
我知道我做错了什么......这是什么?
我假设也为其他用户类型创建中间件并在路由文件中使用。这是正确的做法吗?
laravel - 在数据库中存储计算字段 - Laravel 5.7
我的 laravel 项目中有以下表格
每个配置文件都属于一个用户,每个健身报告都属于一个配置文件。用户可以拥有一个个人资料和多个通过个人资料 ID 连接的健身报告。这是向用户显示每周报告。
Profiles 表包含 user_id、dob、age、height、weight、腰部、臀部、颈部、executive_level 等列,这些列由用户输入并正确存储在配置文件表中。这工作正常。
Fitness_reports 表具有 profile_id、'bmi'、'bmr'、'bai'、'weight_status'、'fat_us'、'fat_bmi'、'fat_mass'、'lean_mass'、'fat_category'等列。所有这些字段都是计算字段,只要配置文件表中有更新,就需要自动计算。
以前我有一个带有计算字段的模型,在下面可以正常工作
然后将其保存在与控制器代码相同的配置文件模型中
但是现在我们创建了一个单独的 Fitness_reports 表来跟踪每周报告。如何在这种情况下做同样的事情。
我试过这个
但这不起作用。什么都没有得救。每当用户更新个人资料中的当前信息时,如何保存不同的报告。
任何帮助表示赞赏