->groupBy('service_user.user_id', 'posts.id', 'project_id', 'title', 'data', 'created_at', 'updated_at', 'type')
DB::table('posts')
->leftJoin('projects', 'posts.project_id', '=', 'projects.id')
->leftJoin('users', 'projects.user_id', '=', 'users.id')
->leftJoin('service_user', 'users.id', '=', 'service_user.user_id')
->leftJoin('services', 'service_user.service_id', '=', 'services.id')
->groupBy('service_user.user_id', 'posts.id')
->select('posts.*', 'service_user.user_id', DB::raw("SUM(service_user.status) as sum_status") )
->paginate(30)
SELECT p.*, u.id, SUM(su.status) as sum_status
FROM `posts` as p
LEFT JOIN projects as p ON p.id = p.project_id
LEFT JOIN users as u ON u.id = p.user_id
LEFT JOIN service_user as su ON su.user_id = u.id
GROUP BY p.id, su.user_id
mix.setResourceRoot('/site')
mix.setPublicPath('public/site')
"scripts": {
"dev": "npm run development",
"development": "mix",
"watch": "mix watch",
"watch-poll": "mix watch -- --watch-options-poll=1000",
"hot": "mix watch --hot",
"prod": "npm run production",
"production": "mix --production"
},
<iframe><my-widget id="244"></my-widget></iframe>