Add airport overview page and links to it #225

This commit is contained in:
Nabeel Shahzad
2018-03-31 15:57:30 -05:00
parent 46f9b3d9b9
commit 0bed38c78b
29 changed files with 380 additions and 56 deletions

View File

@@ -195,3 +195,29 @@ if (!function_exists('show_date')) {
return $date->timezone($timezone)->toFormattedDateString();
}
}
if (!function_exists('_fmt')) {
/**
* Replace strings
* @param $line "Hi, my name is :name"
* @param array $replace ['name' => 'Nabeel']
* @return mixed
*/
function _fmt($line, array $replace)
{
if (empty($replace)) {
return $line;
}
foreach ($replace as $key => $value) {
$key = strtolower($key);
$line = str_replace(
[':'.$key],
[$value],
$line
);
}
return $line;
}
}