这是我的模特:
class Positions extends Model implements Repository
{
protected $fillable = ['index_id', 'title', 'description'];
public function index()
{
return $this->belongsTo('TEST\Indices', 'index_id');
}
public function getById($id)
{
return $this->with('index')->find($id);
}
}
如何在pluck()
函数中使用getById()
列出索引关系?
答案 0 :(得分:0)
你可以这样做:
modules
path=/usr/lib/nginx/modules
http_ssl_module
http_stub_status_module
http_realip_module
http_auth_request_module
http_v2_module
http_dav_module
http_slice_module
http_addition_module
http_geoip_module
http_gunzip_module
http_gzip_static_module
http_image_filter_module=dynamic
http_sub_module
http_xslt_module=dynamic
stream_ssl_module
stream_ssl_preread_module
mail_ssl_module
module=/opt/tempnginx/nginx
1.13.3/debian/modules/nginx
module=/opt/tempnginx/nginx
1.13.3/debian/modules/nginx
module
module=/opt/tempnginx/nginx
1.13.3/debian/modules/nginx
module=/opt/tempnginx/nginx
1.13.3/debian/modules/nginx
module=/opt/tempnginx/nginx
1.13.3/debian/modules/ngx_http_substitutions_filter_module