Balkje naar actief blog bovenaan
This commit is contained in:
@@ -35,6 +35,12 @@ class Controller extends BaseController
|
||||
{
|
||||
View::share('apiUrl', $this->API_URL = env('API_URL', 'http://api.6fm.nl/'));
|
||||
View::share('imgBase', env('IMAGE_BASE_URL', '/'));
|
||||
|
||||
$blogs = $this->getDataFromFileAndConvert('blogs.json', [], '\Model\Blog', 1);
|
||||
$activeBlog = count($blogs) && $blogs[0]->is_active ? $blogs[0] : null;
|
||||
View::share('activeBlog', $activeBlog);
|
||||
|
||||
|
||||
//View::share('onAir', file_get_contents(url('onair')));
|
||||
View::composer('widgets.laatstenieuws', function($view) {
|
||||
$view->with('data', $this->getDataFromFileAndConvert('laatste_nieuws.json', ['news'], '\Model\NewsItem'));
|
||||
@@ -77,7 +83,6 @@ class Controller extends BaseController
|
||||
});
|
||||
View::composer('widgets.menu', function($view) {
|
||||
$view->with('news', $this->getDataFromFileAndConvert('laatste_nieuws.json', ['news'], '\Model\NewsItem'))
|
||||
->with('blogs', $this->getDataFromFileAndConvert('blogs.json', [], '\Model\Blog', 1))
|
||||
->with('popular', $this->getDataFromFileAndConvert('populair_nieuws.json', [], '\Model\NewsItem', 3))
|
||||
->with('podcasts', $this->getDataFromFileAndConvert('laatste_podcasts.json', ['podcasts'], '\Model\Podcast'));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user