Sun feed client
This commit is contained in:
18
app/Services/Feeds/SunFeed.php
Normal file
18
app/Services/Feeds/SunFeed.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
namespace App\Services\Feeds;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
|
||||
class SunFeed
|
||||
{
|
||||
/**
|
||||
* Latest articles published by sun. An Alternative to rss
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get() : array
|
||||
{
|
||||
return Http::get("https://sun.mv/news?page=1&pagination=true")
|
||||
->json()["data"];
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user