src/Classes/OnuList.php
/**
     * search by specific names into onu list
     * @param string $name
     * @return void
     */
search by specific names into onu list
@param string $name
@return void
search by specific names into onu list @param string $name @return void
public function searchByName(string $name): void
    {
        $this->initData();
        $this->name = strtolower($name);
        $client = new Client();
        $crawler = $client->request('GET', config('onulist.url'));
        $crawler->filter('[class="rowtext"]')->each(function ($data) {
            $split = explode('Name:', $data->text());
            if (strcmp(str_replace(' ', '', $this->name), $this->makeName($split)) == 0) {
                $info = [
                    'name' => $this->name,
                ];
                $this->result['is_registered'] = true;
                $this->result['total_results'] += 1;
                $this->result['result'] = $info;
            }
        });
    }
public function searchByName ( string $ name ) : void { $ this -> initData ( ) ; $ this -> name = strtolower ( $ name ) ; $ client = new Client ( ) ; $ crawler = $ client -> request ( 'GET' , config ( 'onulist.url' ) ) ; $ crawler -> filter ( '[class="rowtext"]' ) -> each ( function ( $ data ) { $ split = explode ( 'Name:' , $ data -> text ( ) ) ; if ( strcmp ( str_replace ( ' ' , '' , $ this -> name ) , $ this -> makeName ( $ split ) ) == 0 ) { $ info = [ 'name' => $ this -> name , ] ; $ this -> result [ 'is_registered' ] = true ; $ this -> result [ 'total_results' ] += 1 ; $ this -> result [ 'result' ] = $ info ; } } ) ; }
search by specific names into onu list
 @param string $name
 @return void
search by specific names into onu list @param string $name @return void