diff --git a/app/Http/Controllers/WeatherController.php b/app/Http/Controllers/WeatherController.php deleted file mode 100644 index 661e052..0000000 --- a/app/Http/Controllers/WeatherController.php +++ /dev/null @@ -1,59 +0,0 @@ - $this->getMoosun(), - 'labels' => [ - 'Male' => "މާލެ", - 'Hanimadhoo' => "ހަނިމާދޫ", - 'Kahdhoo' => "ކައްދޫ", - 'Kaadehdhoo' => "ކާޑެއްދޫ", - 'Gan' => "ގަން" - ], - 'satellite_image' => $this->getSatelliteImage() - ]); - } - - protected function getSatelliteImage() - { - return Cache::remember('weather.maldives.satellite', 3600, function () { - $image = new ImgScraper; - - return $image->satellite_image; - }); - } - - protected function getMoosun() - { - - $data = Cache::remember('weather.maldives', 3600, function () { - $data = []; - foreach ($this->stations as $station) { - $rp = new MoosunMv($station); - $data[] = $rp; - } - - return $data; - }); - - return $data; - } -} diff --git a/app/Services/Feeds/AdhadhuFeed.php b/app/Services/Feeds/AdhadhuFeed.php index 114ae2f..073575f 100644 --- a/app/Services/Feeds/AdhadhuFeed.php +++ b/app/Services/Feeds/AdhadhuFeed.php @@ -21,7 +21,9 @@ class AdhadhuFeed implements Feed */ public function get(): array { - $crawler = $this->client->request('GET', "https://adhadhu.com/category/News"); + $crawler = $this->client->request('GET', "https://adhadhu.com/category/News", [ + "proxy" => config('karudhaas.proxy.host') + ]); $feeds = []; diff --git a/composer.json b/composer.json index 04bf3ab..d8be23f 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,6 @@ "fruitcake/laravel-cors": "^2.0", "goldspecdigital/laravel-eloquent-uuid": "^8.0", "guzzlehttp/guzzle": "^7.0.1", - "jinas/moosun": "^1.1", "laravel/framework": "^8.0", "laravel/jetstream": "^1.2", "laravel/sanctum": "^2.6", diff --git a/composer.lock b/composer.lock index e97a7ce..19eb9cf 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "3e5dd0a5a9987085a71fc660d1940ded", + "content-hash": "397d861160a8b5c62ed5576a8d9957f6", "packages": [ { "name": "asm89/stack-cors", @@ -1777,50 +1777,6 @@ ], "time": "2020-06-13T08:05:20+00:00" }, - { - "name": "jinas/moosun", - "version": "v1.1", - "source": { - "type": "git", - "url": "https://github.com/boring-dragon/MoosunMv.git", - "reference": "8a930d1650d9aaa23b3536b4e40082ba976a9189" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/boring-dragon/MoosunMv/zipball/8a930d1650d9aaa23b3536b4e40082ba976a9189", - "reference": "8a930d1650d9aaa23b3536b4e40082ba976a9189", - "shasum": "" - }, - "require": { - "fabpot/goutte": "^4.0@dev", - "guzzlehttp/guzzle": "^6.0|^7.0.1" - }, - "require-dev": { - "phpunit/phpunit": "^9.0@dev" - }, - "type": "library", - "autoload": { - "psr-4": { - "Jinas\\Moosun\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mohamed Jinas", - "email": "j@live.mv" - } - ], - "description": "Simple Interface to interact with maldives meteriology", - "support": { - "issues": "https://github.com/boring-dragon/MoosunMv/issues", - "source": "https://github.com/boring-dragon/MoosunMv/tree/v1.1" - }, - "time": "2020-11-05T08:47:41+00:00" - }, { "name": "laravel/fortify", "version": "v1.7.13", @@ -10041,5 +9997,5 @@ "php": "^7.4|^8.0" }, "platform-dev": [], - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.3.0" } diff --git a/config/karudhaas.php b/config/karudhaas.php index 486c703..9cbaa7a 100644 --- a/config/karudhaas.php +++ b/config/karudhaas.php @@ -2,6 +2,10 @@ return [ + 'proxy' => [ + 'host' => env('PROXY_HOST'), + ], + "topic_filters" => [ "covid19" => [ @@ -30,7 +34,7 @@ return [ "en_name" => "business", "description" => "ފިޔަފާރިއާ ބެހޭ އެންމެ ފަހުގެ ޙަބަރުތަށް", "keys" => [ - "tourism", "sme_loan","sme_bank","public_companies","mtcc","tourists","world_tourism_day_","mtcc_shares","google","guest_house","fish_products","tax", "business", "dhiraagu", + "tourism", "sme_loan", "sme_bank", "public_companies", "mtcc", "tourists", "world_tourism_day_", "mtcc_shares", "google", "guest_house", "fish_products", "tax", "business", "dhiraagu", "raajjeyge_iqthisaadh", "guesthouse", "fathuruverikan", "fathuruverikamuge_dhaairaa", "Airport_development", "regional_airports", "loan-schemes", "economy", "ministry-of-finance-and-treasury", "ooredoo", "fisheries" ], @@ -42,8 +46,8 @@ return [ "en_name" => "world", "description" => "ދުނިޔޭގެ އެކި ކަންކޮޅުތަކުގެ ޙަބަރު", "keys" => [ - "qatar", "gulf", "saudi-arabia", "pakistan", "indonesia", "world", "india", "donald-trump", "united-states-of-america", "sri-lanka", "japan", - "america", "china", "elon-musk", "north-korea" + "qatar", "gulf", "saudi-arabia", "pakistan", "indonesia", "world", "india", "donald-trump", "united-states-of-america", "sri-lanka", "japan", + "america", "china", "elon-musk", "north-korea" ], "color" => "indigo" ] diff --git a/routes/web.php b/routes/web.php index a3428a7..9ad40ab 100644 --- a/routes/web.php +++ b/routes/web.php @@ -51,8 +51,6 @@ Route::get('/about', function () { ============================= */ -Route::get('/weather',[WeatherController::class, 'index'])->name('weather'); - Route::middleware(['auth:sanctum', 'verified'])->prefix('dashboard')->namespace('Admin')->group(function() {