コード例 #1
0
*/
Route::get('/hello', function () {
    return View::make('test');
});
Route::get('/', function () {
    return View::make('index');
    Session::forget('keywords');
    Session::forget('title');
});
Route::get('/contact-us', function () {
    Session::flash('keywords', 'contact us');
    Session::flash('title', 'Contact us');
    return View::make('contact');
});
Route::get('/faq', function () {
    $faqs = faq::all();
    //return $faqs;
    Session::flash('keywords', 'faq, questions, queries');
    Session::flash('title', 'FAQ');
    return View::make('faqs', compact('faqs'));
});
Route::get('/page/{slug}', function ($slug) {
    $content = Page::where('slug', $slug)->first();
    Session::flash('keywords', $content->heading);
    Session::flash('title', $content->heading);
    return View::make('page', compact('content'));
});
//users
Route::controller('users', 'UsersController', array('getLogin' => 'users.login', 'getResend' => 'users.resend'));
Route::any('usernameCheck', function () {
    return View::make('usernameCheck');