Sattelite photo
This commit is contained in:
@@ -4,6 +4,7 @@ namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Jinas\Moosun\MoosunMv;
|
||||
use Jinas\Moosun\ImgScraper;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
|
||||
class WeatherController extends Controller
|
||||
@@ -13,7 +14,8 @@ class WeatherController extends Controller
|
||||
'Hanimadhoo',
|
||||
'Kahdhoo',
|
||||
'Kaadehdhoo',
|
||||
'Gan'];
|
||||
'Gan'
|
||||
];
|
||||
|
||||
public function index()
|
||||
{
|
||||
@@ -25,10 +27,20 @@ class WeatherController extends Controller
|
||||
'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()
|
||||
{
|
||||
|
||||
|
@@ -43,6 +43,14 @@
|
||||
|
||||
</div>
|
||||
|
||||
<h1 class="text-gray-800 text-2xl text-center mt-5 mb-2 mr-3 MvAamu"
|
||||
style="font-weight: 100; letter-spacing: 2.5px;">
|
||||
އެންމެ ފަހުގެ ސެޓެލައިޓް ފޮޓޯ
|
||||
</h1>
|
||||
<div class="flex justify-center mb-5">
|
||||
<img class="w-1/2 h-1/2 object-cover bg-gray-300 rounded" src="{{$satellite_image}}">
|
||||
</div>
|
||||
|
||||
<div class="mb-5 flex justify-center">
|
||||
<p class="text-gray-600">Via Maldives Meteorology</p>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user