this is my MYSQL query:
SELECT product_tasks.id AS product_task_id,
tasks.id AS tasks_id,
tasks.task_name AS label,
tasks.serial_id AS serial_id,
(SELECT serials.starting_series
FROM serials
WHERE serials.id = serial_id) AS starting_series
FROM product_tasks
JOIN tasks ON tasks.id = product_tasks.task_id
WHERE product_tasks.product_id = 1;
AND this is my eloquent query but I haven't finished with it:
ProductTask::select('product_tasks.id as product_task_id',
'tasks.id as tasks_id', 'tasks.task_name as label',
'tasks.serial_id as serial_id', * INSERT missing query here *)
->JOIN('tasks', 'tasks.id', 'product_tasks.task_id')
->WHERE('product_tasks.product_id', 1)
->get();
what is the missing part in my eloquent query?