Files
karudhaas/app/Services/Feeds/VoiceFeed.php
2020-10-03 02:44:11 +05:00

28 lines
564 B
PHP

<?php
namespace App\Services\Feeds;
use Goutte\Client;
class VoiceFeed implements Feed
{
protected $client;
public function __construct()
{
$this->client = new Client();
}
/**
* Get all the latest news
*
* @return array
*/
public function get() : array
{
$crawler = $this->client->request('GET', "https://voice.mv/");
return $crawler->filter('div[id*="latest-news"] .content a')
->extract(['_text', '_attr' => 'href']);
}
}