where('vacancySlug', $vacancySlug)->get(); if (!$vacancyWithForm->isEmpty()) { return view('dashboard.application-rendering.apply') ->with([ 'vacancy' => $vacancyWithForm->first(), 'preprocessedForm' => json_decode($vacancyWithForm->first()->forms->formStructure, true) ]); } else { abort(404, 'We\'re ssssorry, but the application form you\'re looking for could not be found.'); } } }