I have custom code where I must get specific columns from relation data:
$jobs = Job::with('user:id, name')
->where('type', 0)
->where('status', 1)
->orderBy('updated_at', 'DESC')
->get();
When I run this code Laravel return me error message:
SQLSTATE[42S22]: Column not found: 1054 Unknown column ' name' in 'field list'
How can I solve this error?