Schema per maand

This commit is contained in:
2018-05-07 22:04:12 +02:00
parent f0083e4736
commit 5c526ad662
2 changed files with 7 additions and 0 deletions

View File

@@ -292,4 +292,10 @@ QUERY;
return response()->json($this->createSchedule($start, $einde));
}
public function month($year, $month) {
$start = new \DateTimeImmutable($year . '-' . $month . '-01');
$einde = $start->add(\DateInterval::createFromDateString('1 month'));
return response()->json($this->createSchedule($start, $einde));
}
}

View File

@@ -37,6 +37,7 @@ $app->get('podcast/stream/{id:\d+}/{title}', 'PodcastController@stream' );
$app->get('programma/schema/onair', 'ProgramController@onair' );
$app->get('programma/schema/nustraks', 'ProgramController@comingup' );
$app->get('programma/schema/week[/{shiftWeeks:-?\d+}]', 'ProgramController@schedule' );
$app->get('programma/schema/maand/{year:20\d\d}/{month:\d\d?}', 'ProgramController@month' );
$app->get('programma/details/{id:\d+}', 'ProgramController@details' );
$app->get('programma/schema/test/{from}/{to}', 'ProgramController@testSchedule' );