public function update(Request $request, $id)
    {
        $job = Job::findOrFail($id);
        /** @noinspection PhpUndefinedMethodInspection */
        $request->validate([
            'locationId' => 'exists:' . config('combine-core.tablePrefix', 'combine') . '_locations,id',
            'memberIds.*' => 'required|exists:' . config('combine-core.tablePrefix', 'combine') . '_members,id',
            'memberTagIds.*' => 'required|exists:' . config('combine-core.tablePrefix', 'combine') . '_member_tags,id',
            'start' => 'required|date',
        ]);
        $job->start = Carbon::parse($request->start);
        $job->location_id = $request->locationId;
        $this->authorize('manage', $job);
        $job->save();
        /** @noinspection PhpUndefinedMethodInspection */
        $job->members()->sync($request->memberIds);
        /** @noinspection PhpUndefinedMethodInspection */
        $job->member_tags()->sync($request->memberTagIds);
        return fractal($job, new JobTransformer())
            ->withResourceName('job')
            ->respond();
    }