first(); if($step){ return new StepResource($step); } return new StepResource(Step::where('reference_id', $referenceId)->first()); } }