Kerkdienst downloadbaar

This commit is contained in:
2017-09-17 13:49:27 +02:00
parent dcfa959980
commit eac5560554
2 changed files with 10 additions and 1 deletions

View File

@@ -41,6 +41,14 @@ QUERY;
'previous' => $lastNext[0], 'previous' => $lastNext[0],
'next' => $lastNext[1]]); 'next' => $lastNext[1]]);
} }
/**
* Download als MP3 bestand
*/
public function download() {
$file = '/var/audio/podcast/6fm-kerkdienst.mp3';
return response()->download($file, "6FM_Gemist-Kerkdienst.mp3");
}
/** /**
* Podcast van de laatste kerkdienst * Podcast van de laatste kerkdienst

View File

@@ -40,7 +40,8 @@ $app->get('programma/schema/test/{from}/{to}', 'ProgramController@testSchedule'
$app->get('programma/download/{year:20\d\d}/{month:\d\d?}/{day:\d\d?}/{hour:\d\d?}/{duration:\d\d?}', 'PodcastController@complete'); $app->get('programma/download/{year:20\d\d}/{month:\d\d?}/{day:\d\d?}/{hour:\d\d?}/{duration:\d\d?}', 'PodcastController@complete');
$app->get('kerkdienst', 'KerkdienstController@get'); $app->get('kerkdienst', 'KerkdienstController@get');
$app->get('kerkdienst/download', 'KerkdienstController@podcast'); $app->get('kerkdienst/stream', 'KerkdienstController@podcast');
$app->get('kerkdienst/download', 'KerkdienstController@download');
// live/onair // live/onair
// live/stream // live/stream