Changed views from .php extension to .twig
This commit is contained in:
parent
d79535a09b
commit
cdd075f186
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$app->get('/about', function() use($app) {
|
$app->get('/about', function() use($app) {
|
||||||
|
|
||||||
$app->render('about.php');
|
$app->render('about.twig');
|
||||||
|
|
||||||
})->name('about');
|
})->name('about');
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$app->get('/contact', function() use($app) {
|
$app->get('/contact', function() use($app) {
|
||||||
|
|
||||||
$app->render('contact.php');
|
$app->render('contact.twig');
|
||||||
|
|
||||||
})->name('contact');
|
})->name('contact');
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$app->get('/home', function() use($app) {
|
$app->get('/home', function() use($app) {
|
||||||
|
|
||||||
$app->render('home.php');
|
$app->render('home.twig');
|
||||||
|
|
||||||
})->name('home');
|
})->name('home');
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$app->get('/music', function() use($app) {
|
$app->get('/music', function() use($app) {
|
||||||
|
|
||||||
$app->render('music.php');
|
$app->render('music.twig');
|
||||||
|
|
||||||
})->name('music');
|
})->name('music');
|
||||||
|
@ -1,25 +1,25 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$app->get('/shows', function() use($app) {
|
$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'));
|
$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) {
|
foreach ($shows as $show) {
|
||||||
$show->date = date('M dS', strtotime($show->datetime));
|
$show->date = date('M dS', strtotime($show->datetime));
|
||||||
$show->day = date('D', strtotime($show->datetime));
|
$show->day = date('D', strtotime($show->datetime));
|
||||||
$show->time = date('H:i', strtotime($show->datetime));
|
$show->time = date('H:i', strtotime($show->datetime));
|
||||||
}
|
}
|
||||||
|
|
||||||
$app->render('shows.php', [
|
$app->render('shows.twig', [
|
||||||
'shows' => $shows,
|
'shows' => $shows,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
})->name('shows');
|
})->name('shows');
|
||||||
|
|
||||||
$app->get('/shows/json', function() use($app) {
|
$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'));
|
$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) {
|
foreach ($shows as $show) {
|
||||||
$show->date = date('M dS', strtotime($show->datetime));
|
$show->date = date('M dS', strtotime($show->datetime));
|
||||||
$show->day = date('D', strtotime($show->datetime));
|
$show->day = date('D', strtotime($show->datetime));
|
||||||
|
Loading…
Reference in New Issue
Block a user