Get first item matching to callable or default
@param callable|array $where
@param mixed $default
@return mixed
977116
public function whereFirstOrDefault($where, $default=null)
    {
        $where = LambdaUtils::toConditionCallable($where);
        foreach($this as $record)
        {
            if(call_user_func($where, $record))
            {
                return $record;
            }
        }
        return $default;
    }
977457
public function get($key, $default = null)
    {
        if ($this->exists($key)) {
            return $this->items[$key];
        }

        $result = $this->items;

        foreach (explode('.', $key) as $piece) {
            if (is_array($result) && array_key_exists($piece, $result)) {
                $result = $result[$piece];
            } else {
                return $default;
            }
        }

        return $result;
    }
23749
public function getPaginator( $where = null, $order = null )
    {
        return $this->getMapper()
                    ->getPaginator( $where, $order );
    }
266144
public function get($name, $default = null)
    {
        if ($this->exists($name)) {
            $data = Query::from($this->table)
                        ->where('name', '=', $name)
                        ->first();

            if ($data->lifetime >= time()) {
                return $this->unpacking($data->value);
            } else {
                $this->remove($name);

                return $default;
            }
        }

        return $default;
    }
1076198
public static function get($name = null, $default = null)
    {
        $queryParams = app()->request->getQueryParams();

        if (is_null($name)) {
            return $queryParams;
        } elseif (isset($queryParams[$name])) {
            return $queryParams[$name];
        }

        return $default;
    }
788688
public function find($key, $default = null)
    {
        if ($key instanceof Model) {
            $key = $key->getKey();
        }

        return array_first($this->items, function($itemKey, $model) use ($key)
        {
            return $model->getKey() == $key;

        }, $default);
    }
169358
public function getOrDefault(string $id, $default = null)
    {
        $this->freeze();

        if (!$this->has($id)) {
            return $default;
        }

        return $this->get($id);
    }
437725
public function get($key, $default = null)
	{
		if(array_key_exists($key, $this->items))
		{
			return $this->items[$key];
		}

		return $default;
	}
268575
public function find($key, $default = null)
    {
        if ($key instanceof Model) {
            $key = $key->getKey();
        }

        if (is_array($key)) {
            if ($this->isEmpty()) {
                return new static;
            }

            return $this->whereIn($this->first()->getKeyName(), $key);
        }

        return Arr::first($this->items, function ($model) use ($key) {
            return $model->getKey() === $key;
        }, $default);
    }
1058813
public function first($default = NULL)
    {
        $first = $this->shift();
        if (! $first) {
            $first = $default;
        } else {
            $this->unshift($first);
        }
        return $first;
    }
1287662
public function whereFirst($where)
    {
        $where = LambdaUtils::toConditionCallable($where);
        foreach($this as $record)
        {
            if(call_user_func($where, $record))
            {
                return $record;
            }
        }
        throw new \OutOfBoundsException();
    }
616973
public function get( $name, $default = null )
	{
		if( ( $entry = $this->object->get( $name ) ) !== null ) {
			return $entry;
		}

		return $default;
	}
708295
protected function getLocal($name, $default = null)
    {
        return array_key_exists($name, $this->locals)?$this->locals[$name]:$default;
    }
68814
public function get($key = null, $default = null)
    {
        if (!func_num_args()) {
            return $this->collection->all();
        }

        return $this->fetchFromArray($key, $default);
    }
946728
public function firstOrFailBy(array $where = [], array $with = [])
    {
        $query = $this->make($with);

        $query = $this->applyWhere($query, $where);

        return $query->firstOrFail();
    }
1350922
public function query($name = null, $default = null)
    {
        if ($name) {
            return $this->request->query->get($name, $default);
        }

        return $this->request->query->all();
    }
1252745
public function getSingle($identifier, $default = null)
    {
        $get = $this->get($identifier, $default);
        if (is_array($get)) {
            return array_values($this->identifiers[$identifier])[0];
        }

        return $get;
    }