src/Classes/OnuList.php
/**
     * search all names into onu list
     */
search all names into onu list
search all names into onu list
public function searchAll(): void
    {
        $this->initData();
        $client = new Client();
        $crawler = $client->request('GET', config('onulist.url'));
        $crawler->filter('[class="rowtext"]')->each(function ($data) {
            $split = explode('Name:', $data->text());
            $info = [
                'name' => $this->makeName($split),
            ];
            $this->result['total_results'] += 1;
            array_push($this->result['result'], $info);
        });
    }
public function searchAll ( ) : void { $ this -> initData ( ) ; $ client = new Client ( ) ; $ crawler = $ client -> request ( 'GET' , config ( 'onulist.url' ) ) ; $ crawler -> filter ( '[class="rowtext"]' ) -> each ( function ( $ data ) { $ split = explode ( 'Name:' , $ data -> text ( ) ) ; $ info = [ 'name' => $ this -> makeName ( $ split ) , ] ; $ this -> result [ 'total_results' ] += 1 ; array_push ( $ this -> result [ 'result' ] , $ info ) ; } ) ; }
search all names into onu list
search all names into onu list