做点有意义的事情

function amaze_page_content_top($data) {
    $hours = date('H', time());
    if ($hours > 6 && $hours <= 9) {
        $message = '早上好';
    } else if ($hours > 9 && $hours <= 12) {
        $message = '上午好';
    } else if ($hours > 12 && $hours <= 18) {
        $message = '下午好';
    } else if ($hours > 18 && $hours <= 24) {
        $message = '晚上好';
    } else if ($hours > 0 && $hours <= 6) {
        $message = '午夜好';
    }

    $data .= $message;

    return $data;
}
function amaze_page_content_top($data) {
    $hours = date('H', time());
    if ($hours > 6 && $hours <= 9) {
        $message = '早上好';
    } else if ($hours > 9 && $hours <= 12) {
        $message = '上午好';
    } else if ($hours > 12 && $hours <= 18) {
        $message = '下午好';
    } else if ($hours > 18 && $hours <= 24) {
        $message = '晚上好';
    } else if ($hours > 0 && $hours <= 6) {
        $message = '午夜好';
    }

    $data .= View::make("amaze::hello", array('message' => $message))->render();

    return $data;
}
<div class="alert alert-success" role="alert">{{$message}}</div>