Skip to content

Instantly share code, notes, and snippets.



Last active Jun 20, 2018
What would you like to do?
Bad Example
if (empty($data["username"])) {
throw new \Exception("Username is required.");
if (empty($data["name"])) {
$first = $data["first_name"] ?? '';
$last = $data["last_name"] ?? '';
$data["name"] = "$first $last";
$params = new SearchParams($data['username'], $data['name']);
$model = new User();
$result = $model->search($params);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.