一个比较复杂的laravel orm eloquent查询
projects
id, name
projects_services(1 project_id <-> M service_id)
project_id, service_id
services
id, name
services_modules(M service_id <-> N module_id)
service_id, module_id
modules
id, name
modules_scripts(1 module_id<->1 script_id)
module_id, script_id
scripts
id, name
如果我想利用laravel的eloquent查询如下信息,应该如何实现呢?
script_id, script_name, module_name, service_name, project_name
淋淋查水表
9 years, 5 months ago