public function getStatuses($sender, $postId, $user) { if (checkFriendship($sender, $user)) { $status = Status::where('id', $postId)->first(); return $status; } else { return 'Error:103'; } }
function getStatusById($id) { return Status::where('id', $id)->firstOrFail(); }