Beelden toegevoegd
This commit is contained in:
@@ -214,11 +214,16 @@ QUERY;
|
||||
/**
|
||||
* Beelden ophalen
|
||||
*/
|
||||
public function featuredimages(Request $request) {
|
||||
public function featuredimageslist(Request $request) {
|
||||
$count = (int)$request->get('aantal', 1000);
|
||||
$page = (int)$request->get('pagina', 1);
|
||||
$startIndex = ($page - 1) * $count;
|
||||
$today = new \DateTime('today');
|
||||
$items = app('db')->select(self::$BASE_SQL
|
||||
. ' AND (`news`.`enddt` = 0 OR `news`.`enddt` >= :today) '
|
||||
. ' ORDER BY `news`.`startdt` ASC, `news`.`enddt` ASC', ['target' => self::$WEBSITE_TARGET, 'category' => self::$FEATIMG_CATEGORY, 'secondarycategory' => 0, 'today' => $today]);
|
||||
. ' ORDER BY `news`.`startdt` ASC, `news`.`enddt` ASC'
|
||||
. ' LIMIT ' . (int)$startIndex . ', ' . (int)$count,
|
||||
['target' => self::$WEBSITE_TARGET, 'category' => self::$FEATIMG_CATEGORY, 'secondarycategory' => 0, 'today' => $today]);
|
||||
|
||||
$result = array();
|
||||
foreach($items as $item) {
|
||||
|
||||
@@ -38,7 +38,8 @@ $app->get('agenda/populair', 'NewsController@popularCalendar' );
|
||||
$app->get('vacatures/overzicht', 'NewsController@jobslist' );
|
||||
$app->get('vacatures/details/{id:\d+}', 'NewsController@jobsitem' );
|
||||
|
||||
$app->get('beelden/overzicht', 'NewsController@featuredimages' );
|
||||
$app->get('beelden/overzicht', 'NewsController@featuredimageslist' );
|
||||
$app->get('nieuws/regio/{region:[a-z0-9-]+}', 'NewsController@featuredimagesregion' );
|
||||
|
||||
$app->get('blog/overzicht', 'NewsController@bloglist');
|
||||
$app->get('blog/overzicht/{id:\d+}', 'NewsController@blogitemlist');
|
||||
|
||||
Reference in New Issue
Block a user