Added the project's files to the repo
This commit is contained in:
7
app/routes/about.php
Executable file
7
app/routes/about.php
Executable file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
$app->get('/about', function() use($app) {
|
||||
|
||||
$app->render('about.php');
|
||||
|
||||
})->name('about');
|
7
app/routes/contact.php
Executable file
7
app/routes/contact.php
Executable file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
$app->get('/contact', function() use($app) {
|
||||
|
||||
$app->render('contact.php');
|
||||
|
||||
})->name('contact');
|
7
app/routes/home.php
Executable file
7
app/routes/home.php
Executable file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
$app->get('/', function() use($app) {
|
||||
|
||||
$app->render('home.php');
|
||||
|
||||
})->name('home');
|
7
app/routes/music.php
Executable file
7
app/routes/music.php
Executable file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
$app->get('/music', function() use($app) {
|
||||
|
||||
$app->render('music.php');
|
||||
|
||||
})->name('music');
|
32
app/routes/shows.php
Executable file
32
app/routes/shows.php
Executable file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
$app->get('/shows', function() use($app) {
|
||||
|
||||
$shows = json_decode(file_get_contents('http://api.bandsintown.com/artists/HALFtone/events.json?api_version=2.0&app_id=shows_halftoneband.com'));
|
||||
|
||||
foreach ($shows as $show) {
|
||||
$show->date = date('M dS', strtotime($show->datetime));
|
||||
$show->day = date('D', strtotime($show->datetime));
|
||||
$show->time = date('H:i', strtotime($show->datetime));
|
||||
}
|
||||
|
||||
$app->render('shows.php', [
|
||||
'shows' => $shows,
|
||||
]);
|
||||
|
||||
})->name('shows');
|
||||
|
||||
$app->get('/shows/json', function() use($app) {
|
||||
|
||||
$shows = json_decode(file_get_contents('http://api.bandsintown.com/artists/HALFtone/events.json?api_version=2.0&app_id=shows_halftoneband.com'));
|
||||
|
||||
foreach ($shows as $show) {
|
||||
$show->date = date('M dS', strtotime($show->datetime));
|
||||
$show->day = date('D', strtotime($show->datetime));
|
||||
$show->time = date('H:i', strtotime($show->datetime));
|
||||
print_r($show);
|
||||
echo '<br /><br />';
|
||||
}
|
||||
die();
|
||||
|
||||
})->name('shows.json');
|
Reference in New Issue
Block a user