src/storage/QueryTrait.php
public function one()
    {
        $data = $this->filter();
        
        return (count($data) !== 0) ? $this->createItem(array_values($data)[0]): false;
    }
public function one()
    {
        $data = $this->filter();
        
        return (count($data) !== 0) ? $this->createItem(array_values($data)[0]): false;
    }
public function one ( ) { $ data = $ this -> filter ( ) ; return ( count ( $ data ) !== 0 ) ? $ this -> createItem ( array_values ( $ data ) [ 0 ] ) : false ; }
Find One based on the where condition.

If there are several items, it just takes the first one and does not throw an exception.

@return \luya\admin\image\Item|\luya\admin\file\Item|\luya\admin\folder\Item
Find One based on the where condition .