示例#1
0
<?php

use SocialNorm\Exceptions\ApplicationRejectedException;
use SocialNorm\Exceptions\InvalidAuthorizationCodeException;
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
Route::get('/', function () {
    $topics = App\Topic::all()->sortBy('name');
    return view('home')->with('topics', $topics);
});
Route::get('/admin', ['middleware' => 'auth', function () {
    return view('admin');
}]);
Route::controller('users', 'UserController');
// Route::group(['prefix' => 'users'], function(){
// 	Route::get('/login', function(){
// 		return "Auth.login";
// 	});
// 	Route::get('/setup', function(){
// 	});
// });
Route::get('/topic/{slug}', function ($slug) {
    // return $slug;