Liveblog basic functionality
This commit is contained in:
@@ -112,12 +112,18 @@ class NewsController extends Controller
|
||||
|
||||
public function liveblog(Request $request, $id)
|
||||
{
|
||||
|
||||
parent::registerView($request, 'blog', $id);
|
||||
|
||||
$blog = $this->API('nieuws/liveblog/' . (int) $id);
|
||||
foreach( $blog->artikelen as &$item ) {
|
||||
$item = new \Model\NewsItem( $item );
|
||||
foreach ($blog->artikelen as &$item) {
|
||||
$item = new \Model\NewsItem($item);
|
||||
}
|
||||
|
||||
if (request()->ajax()) {
|
||||
return $blog;
|
||||
}
|
||||
|
||||
if (count($blog->artikelen)) {
|
||||
return view('blog', ['blog' => $blog]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user