Laatste nieuws balk
This commit is contained in:
32
website/resources/views/widgets/laatstenieuws.blade.php
Normal file
32
website/resources/views/widgets/laatstenieuws.blade.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/*
|
||||
$latest_news = json_decode(file_get_contents('http://api-dev.6fm.nl/nieuws/overzicht?pagina=1&aantal=3'))->news;
|
||||
|
||||
$news = [];
|
||||
foreach($latest_news as $raw)
|
||||
{
|
||||
$news[] = new \Model\NewsItem($raw);
|
||||
}
|
||||
Storage::disk('local')->put('laatste_nieuws.json', json_encode($news));
|
||||
*/
|
||||
|
||||
$latest_news = json_decode(Storage::disk('local')->get('laatste_nieuws.json'));
|
||||
?>
|
||||
|
||||
<div class="latest_news_scrolling_list_container">
|
||||
<ul>
|
||||
<li class="category">Laatste nieuws:</li>
|
||||
<li class="left"><a href="#"></a></li>
|
||||
<li class="right"><a href="#"></a></li>
|
||||
<li class="posts">
|
||||
<ul class="latest_news_scrolling_list">
|
||||
@foreach($item as $latest_news)
|
||||
<li>
|
||||
<a href="{{url($item->url)}}" title="{{$item->title}}">{{$item->title}}</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user