腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
1
回答
如何为Elastic Beanstalk配置
Laravel
?
、
我已经让实例和所有东西都正常运行了,但是我的配置不起作用,我不知道该怎么让它起作用。生产模式配置 'url' => 'http://patientdueling.com', 'profiler' => false,);
浏览 3
提问于2012-12-07
得票数 0
回答已采纳
1
回答
如何在
laravel
上创建自动例程
、
如何为
laravel
创建一个逻辑,当传递事件日期时,它的状态将被更改。
浏览 6
提问于2019-06-16
得票数 0
2
回答
Laravel
Eloquent
-
where
with and
、
、
如下所示: $query->
where
(['column.round' => 1, 'column.score' => $request->score1] and ['column.round' =>
浏览 10
提问于2017-01-09
得票数 0
1
回答
优化后的
Laravel
错误:清除:调用null上的成员函数connection()
#0 [
laravel
root folder]/vendor/
laravel
/framework/src/Illuminate/Database/
Eloquent
/Model.php(1700):Illuminate\\Database\\
Eloquent
\\Model::resolveConnection(NULL) #1 [
laravel
root folder]/vendor/
larav
浏览 1
提问于2022-09-25
得票数 0
1
回答
Laravel
静态和非静态方法
、
在
Laravel
框架中,可以使用Model的方法作为静态和非静态方法,例如,您可以像这样从Databse获取用户: User::
where
('id', 1)->first(); 也是这样的: $user= new User(); $user->
where
('id', 1)->first(); 你如何在PHP中做到这一点?
浏览 31
提问于2020-09-09
得票数 0
回答已采纳
1
回答
“未处理的异常:从空值创建默认对象”
、
、
、
、
($id)->first(); dd(/
eloquent</em
浏览 2
提问于2013-03-17
得票数 0
回答已采纳
4
回答
如何用
Eloquent
检查"if not null“?
、
如何使用
Eloquent
检查字段是否不为空? 'query' => string 'select * from my_table
where
sent_at = ?
浏览 29
提问于2014-01-22
得票数 283
回答已采纳
2
回答
如何为
Laravel
口才添加新的方法链?
、
、
products() return $this->hasMany('App\Product');{} 调用未定义方法Illuminate\Database\
Eloquent
\Relations\HasMany::obsolate
浏览 1
提问于2020-05-06
得票数 1
回答已采纳
1
回答
在
Laravel
中如何根据外键选择口才
在我的
Laravel
-5.8项目中,我有这样的模型: class HrLeaveType extends Model protected $table = 'hr_leave_types'('employee_code', $employeeCode)->
where
('company_id', $userCompany)->pluck('employee_type_id')->first(); $employeeegendercode
浏览 1
提问于2020-10-05
得票数 0
1
回答
Eloquent
DataTables将所有属性强制转换为字符串
、
、
、
Eloquent
DataTables将所有属性转换为字符串,甚至是整型ids。PHP 7.2
Laravel
5.5版 Yajra
laravel
-datatables版本8.4 Mysql 8 问题的代码片段 return \DataTables::
eloquent
(Users::
where
('isActive',1)) ->make(true);
浏览 13
提问于2020-04-23
得票数 2
回答已采纳
1
回答
使用
Eloquent
的
Laravel
查询构建器
、
、
我对
Laravel
非常陌生,对模型和数据库的事情很迷惑。我知道一个模型代表一个表。因此,我在没有迁移的情况下使用artisan命令创建了一个模型,它创建了如下代码。namespace App; {} 因为我有一个不同的表名,所以我添加了protected $table = 'regcars';,并假设这个模型现在可以通过从控制器运行诸如RegCars::
wh
浏览 18
提问于2020-09-10
得票数 0
回答已采纳
2
回答
无法在
Laravel
5.2中调用范围类中的Auth类
、
简单地创建范围,名称为DeveloperScopeuse Illuminate\Database\
Eloquent
\Builder;use Auth; { $builder->
where
('id',
浏览 3
提问于2017-01-24
得票数 0
回答已采纳
2
回答
如何在
Laravel
5 PHP中构建有说服力的查询来检索主表的记录,并在它的相关表上应用
where
子句?
、
、
、
使用
Laravel
文档中的多到多多态relaltionshiop数据库结构,如下所示: id - integer id - integertaggables taggable_id - integer我想检索post记录,post.name LIKE %
laravel
%还是tags.name LIKE %
laravel
%。这对我来说是一个很大的挑战,因为我只想得到他们的名字由单词<
浏览 7
提问于2019-08-15
得票数 0
回答已采纳
1
回答
SQLSTATE[42S22]:未找到列:'
where
子句‘中的1054个未知列’
、
、
、
我一直在犯错误 update `contactables` set `updated_at` = 2019-08-16 20:35:56, `active` = 0
where
`` is null and `key_ID` = 235852 我试图在多态模型上使用雄辩的firstOrNew
浏览 2
提问于2019-08-17
得票数 0
回答已采纳
1
回答
在
where
中乘以
eloquent
in
laravel
、
您好,我正在尝试使用
eloquent
在
laravel
中运行此sql查询 SELECT name FROM `products`
WHERE
`price` * `quantity` >= 100;在sql中,我得到了预期的结果 在
laravel
与雄辩中,我尝试着这样做: $products = product::
where
(DB::raw('(price * quantity >= 100)'))->pluck('name'); 结果 Illumi
浏览 19
提问于2021-08-01
得票数 0
回答已采纳
1
回答
基于远程belongsToMany > belongsTo关系的记录查找
、
这似乎应该是一句简单的台词:到目前为止,我最接近的是这个丑陋的东西with(['assets'])->find(1) >>> $product->assets()->with(['asset_type' => function ($query) { $query->
浏览 0
提问于2018-07-13
得票数 1
回答已采纳
2
回答
方法在
Laravel
模型中是如何工作的?
、
、
我们经常在我们的模型中使用
where
方法,但是它没有在基础模型类中定义,那么
laravel
是如何做到这一点的呢?例如MyModel::
where
('id, 2)->get(); 上面的
where
肯定会获取id等于2的记录,但是
where
&这是怎么发生的!我回溯到
Laravel
中的基本模型,但没有找到
where
方法!
浏览 39
提问于2019-03-02
得票数 2
回答已采纳
1
回答
Laravel
Eloquent
where
return null
、
、
、
as content";$berita = Report::select("*", "$title", "$content")->
where
浏览 10
提问于2019-01-31
得票数 0
回答已采纳
2
回答
没有工匠命令的小型独立的一次性脚本?
、
、
有没有办法有一个独立的
laravel
脚本,可以让我访问
Laravel
组件?只是我尝试过的一个例子:$res=User::
where
('id',5)->first();?/
laravel
浏览 0
提问于2019-09-09
得票数 7
回答已采纳
2
回答
laravel
eloquent
->whereHas -编写自己的exists(子查询)
、
、
、
、
Laravel
Eloquent
->whereHas()使用exists()子查询- -来返回结果。$query->
where
( DB::raw(' exists( subquery ) ')
where
exists( subquery ) isnull 所以我想知道什么$query->
浏览 13
提问于2018-08-29
得票数 1
回答已采纳
点击加载更多
相关
资讯
Laravel Eloquent—基本概念用法
Laravel源码解析之Eloquent Model
Laravel复杂SQL超多WHERE子句,本地作用域你没用过
3分钟短文:Laravel 从软删除说到模型作用域的概念
3分钟短文:Laravel 模型查询数据库的几个关键方法
热门
标签
更多标签
云服务器
ICP备案
腾讯会议
云直播
对象存储
活动推荐
运营活动
广告
关闭
领券