public function fromItem(Item $item)
    {
        return Comment::createFromArray(array_filter([
            'id' => $item->getId(),
            'source' => $item->get('source'),
            'parent' => $item->get('parent'),
            'author_uuid' => $item->get('author_uuid'),
            'author_name' => $item->get('author_name'),
            'author_email' => $item->get('author_email'),
            'author_avatar' => $item->get('author_avatar'),
            'author_role' => $item->get('author_role'),
            'thumb' => $item->get('thumb'),
            'rating' => $item->get('rating'),
            'content' => $item->get('content'),
            'state' => $item->get('state'),
            'created_at' =>  $item->get('created_at'),
        ]));
    }
public function fromItem(Item $item)
    {
        return Comment::createFromArray(array_filter([
            'id' => $item->getId(),
            'source' => $item->get('source'),
            'parent' => $item->get('parent'),
            'author_uuid' => $item->get('author_uuid'),
            'author_name' => $item->get('author_name'),
            'author_email' => $item->get('author_email'),
            'author_avatar' => $item->get('author_avatar'),
            'author_role' => $item->get('author_role'),
            'thumb' => $item->get('thumb'),
            'rating' => $item->get('rating'),
            'content' => $item->get('content'),
            'state' => $item->get('state'),
            'created_at' =>  $item->get('created_at'),
        ]));
    }
public function fromItem ( Item $ item ) { return Comment :: createFromArray ( array_filter ( [ 'id' => $ item -> getId ( ) , 'source' => $ item -> get ( 'source' ) , 'parent' => $ item -> get ( 'parent' ) , 'author_uuid' => $ item -> get ( 'author_uuid' ) , 'author_name' => $ item -> get ( 'author_name' ) , 'author_email' => $ item -> get ( 'author_email' ) , 'author_avatar' => $ item -> get ( 'author_avatar' ) , 'author_role' => $ item -> get ( 'author_role' ) , 'thumb' => $ item -> get ( 'thumb' ) , 'rating' => $ item -> get ( 'rating' ) , 'content' => $ item -> get ( 'content' ) , 'state' => $ item -> get ( 'state' ) , 'created_at' => $ item -> get ( 'created_at' ) , ] ) ) ; }
Create object by item.

@param Item $item

@return mixed
Create object by item .