Route::get('reports/clearCache', 'ReportsController@clearCache');
Route::get('reports/', 'ReportsController@speciesByMonth');
Route::get('reports/speciesByMonth', 'ReportsController@speciesByMonth');
Route::get('reports/speciesByYear', 'ReportsController@speciesByYear');
Route::get('reports/speciesForMonth/{monthNumber}', 'ReportsController@speciesForMonth');
Route::get('reports/speciesForYear/{year}', 'ReportsController@speciesForYear');
Route::get('reports/speciesDetail/{speciesId}', 'ReportsController@speciesDetail');
Route::get('reports/speciesByOrder', 'ReportsController@speciesByOrder');
Route::get('reports/speciesForOrder/{orderId}', 'ReportsController@speciesForOrder');
Route::get('reports/speciesAll', 'ReportsController@speciesAll');
Route::get('reports/searchAll', 'ReportsController@searchAll');
Route::get('reports/speciesByLocation', 'ReportsController@speciesByLocation');
Route::get('reports/speciesForLocation/{locationId}', 'ReportsController@speciesForLocation');
Route::get('reports/birdLookup', 'ReportsController@birdLookup');
// posts, puts, and deletes require csrf check
Route::when('*', 'csrf', ['post', 'put', 'delete']);
// login and logout routes not requiring authentication
Route::get('login', 'AdminController@login');
Route::post('login', 'AdminController@authenticate');
Route::get('logout', 'AdminController@logout');
// admin routes all require authenticated user
Route::group(['prefix' => 'admin', 'before' => 'auth'], function () {
    Route::get('logout', 'AdminController@unauthenticate');
    Route::get('menu', 'AdminController@menu');
    Route::get('clearCache', 'AdminController@clearCache');
    Route::get('trips/{id}/sightings', 'TripController@sightings');
    Route::resource('sightings', 'SightingController');
    Route::resource('trips', 'TripController');
    Route::resource('locations', 'LocationController');
    Route::get('sendTestMailSwift', 'MailController@sendTestMailSwift');
    Route::get('sendTestMailLaravel', 'MailController@sendTestMailLaravel');
Beispiel #2
0
 *  Frontend Routes
 *  ------------------------------------------
 */
// Confide routes
Route::get('users/register', 'UsersController@create');
Route::get('users/create', 'UsersController@create');
Route::post('users', 'UsersController@store');
Route::get('users/login', 'UsersController@login');
Route::post('users/login', 'UsersController@doLogin');
Route::get('users/confirm/{code}', 'UsersController@confirm');
Route::get('users/forgot_password', 'UsersController@forgotPassword');
Route::post('users/forgot_password', 'UsersController@doForgotPassword');
Route::get('users/reset_password/{token}', 'UsersController@resetPassword');
Route::post('users/reset_password', 'UsersController@doResetPassword');
Route::get('users/logout', 'UsersController@logout');
# User RESTful Routes (Login, Logout, Register, etc)
Route::controller('users', 'UsersController');
//:: Application Routes ::
# Filter for detect language
Route::when('contact-us', 'detectLang');
# Contact Us Static Page
Route::get('contact-us', function () {
    // Return about us page
    return View::make('site/contact-us');
});
# Posts - Second to last set, match slug
Route::get('{postSlug}', 'BlogController@getView');
Route::post('{postSlug}', 'BlogController@postView');
# Index Page - Last route, no matches
Route::get('/', array('before' => 'detectLang', 'uses' => 'UsersController@login'));
#Route::get('/', array('before' => 'detectLang','uses' => 'BlogController@getIndex')); #route asli
Beispiel #3
0
|--------------------------------------------------------------------------
|
| 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.
|
*/
/*
#Laravel 5.1 默认路由
Route::get('/', function () {
    return view('welcome');
});
*/
//added some test routes
#对后台开启csrf过滤
Route::when('admin/*', 'csrf', ['post', 'delete', 'put']);
Route::any('cp', function () {
    return Response::view('cp');
});
/*
|--------------------------------------------------------------------------
| 基础权限 登录注册找回密码等操作
|--------------------------------------------------------------------------
*/
Route::group(['prefix' => 'auth'], function () {
    $Authority = 'AuthorityController@';
    # 退出
    Route::get('logout', ['as' => 'logout', 'uses' => $Authority . 'getLogout']);
    # 登录
    Route::get('login', ['as' => 'login', 'uses' => $Authority . 'getLogin']);
    Route::post('login', $Authority . 'postLogin');
Beispiel #4
0
|
| The following filters are developed for larapress but may be also useful
| for your website. You can apply them to any route you'd like.
|
*/
Route::filter('force.human', 'Larapress\\Filters\\Special\\ForceHumanFilter');
/*
|--------------------------------------------------------------------------
| Filters for the larapress backend
|--------------------------------------------------------------------------
|
| The following filters are used to verify that the user of the current
| session is logged into this application and has the required permissions
| for several tasks.
|
*/
Route::filter('access.backend', 'Larapress\\Filters\\Backend\\AccessBackendFilter');
Route::filter('force.ssl', 'Larapress\\Filters\\Backend\\ForceSSLFilter');
/*
|--------------------------------------------------------------------------
| Pattern Filters for the larapress backend
|--------------------------------------------------------------------------
|
| The following filters are used to define when to use larapress's filters.
|
*/
$backend_url = Config::get('larapress.urls.backend');
Route::when($backend_url . '/cp*', 'access.backend');
Route::when($backend_url . '/reset-password', 'force.human', array('post'));
Route::when($backend_url . '*', 'force.ssl');
Beispiel #5
0
<?php

/*
|--------------------------------------------------------------------------
| 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::controllers(['auth' => 'Auth\\AuthController']);
Route::resource('posts', 'PostController');
Route::resource('comments', 'CommentController');
Route::get('/', function () {
    return view('welcome');
});
Route::filter('manage_posts', function () {
    if (!Entrust::hasRole('admin')) {
        return Redirect::to('/posts');
    }
});
Route::when('posts*', 'manage_posts', array('post', 'put', 'delete'));
Route::when('posts/create', 'manage_posts');
Route::when('posts/*/edit', 'manage_posts');
Beispiel #6
0
Route::get('admin/tag/create', 'Admin\\TagController@create');
Route::post('admin/tag/store', 'Admin\\TagController@store');
Route::get('admin/tag/edit/{id}', 'Admin\\TagController@edit');
Route::post('admin/tag/update/{id}', ['as' => 'admin.tag.update', 'uses' => 'Admin\\TagController@update']);
/*
Route::group(['prefix' => 'admin', 'middleware' => ['role:admin']], function() {
    Route::get('/', 'AdminController@welcome');
    Route::get('/manage', ['middleware' => ['permission:manage-admins'], 'uses' => 'AdminController@manageAdmins']);
});*/
Route::filter('manage_posts', function () {
    // check the current user
    if (!Entrust::hasRole('admin')) {
        return Redirect::to('/');
    }
});
Route::when('admin/role*', 'manage_posts');
//  Route::get('admin/attribute/index','Admin\AttributeController@index');
//属性
Route::get('admin/attribute/index', 'Admin\\AttributeController@index');
//Route::get('admin/attribute/index/{id}', 'Admin\AttributeController@index');
Route::post('admin/attribute/save', 'Admin\\AttributeController@save');
Route::get('admin/attribute/create', 'Admin\\AttributeController@create');
Route::get('admin/attribute/attrlist/{id}', 'Admin\\AttributeController@attrlist');
Route::get('admin/attribute/edit/{id}', 'Admin\\AttributeController@edit');
Route::post('admin/attribute/store/{id}', ['as' => 'admin.attribute.store', 'uses' => 'Admin\\AttributeController@store']);
//商品
Route::get('admin/itemcat/index', 'Admin\\ItemCatController@index');
Route::get('admin/item/index', 'Admin\\ItemController@index');
Route::post('admin/item/save', 'Admin\\ItemController@save');
Route::get('admin/item/select', 'Admin\\ItemController@select');
//商品类型
|--------------------------------------------------------------------------
| 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 Closure to execute when that URI is requested.
|
*/
//////////////////QUAN LY DASHBOARD//////////////////////////////////
Route::post('/quanly/checklogin', 'quanly\\DashboardController@checklogin');
Route::group(['before' => 'authS|kiemtraquyen'], function () {
    Route::get('/quanly', function () {
        return View::make('quanly.dashboard');
    });
    Route::when('/quanly/*', 'csrf', array('post'));
    Route::get('/quanly/logout', 'quanly\\DashboardController@logout');
    //TIN TUC
    Route::get('/quanly/tintuc', 'quanly\\AdminTinTucController@index');
    Route::post('/quanly/tintuc/delete/', 'quanly\\AdminTinTucController@delete');
    Route::get('/quanly/tintuc/edit/{id}', 'quanly\\AdminTinTucController@edit');
    Route::get('/quanly/tintuc/add', 'quanly\\AdminTinTucController@add');
    Route::post('/quanly/tintuc/save', 'quanly\\AdminTinTucController@save');
    Route::post('/quanly/tintuc/storage', 'quanly\\AdminTinTucController@storage');
    //CHUYEN MUC
    Route::get('/quanly/chuyenmuc', 'quanly\\AdminChuyenmucController@index');
    Route::get('/quanly/chuyenmuc/add', 'quanly\\AdminChuyenmucController@add');
    Route::post('/quanly/chuyenmuc/storage', 'quanly\\AdminChuyenmucController@storage');
    Route::post('/quanly/chuyenmuc/delete', 'quanly\\AdminChuyenmucController@delete');
    Route::post('/quanly/chuyenmuc/save', 'quanly\\AdminChuyenmucController@save');
    Route::get('/quanly/chuyenmuc/edit/{id}', 'quanly\\AdminChuyenmucController@edit');
Beispiel #8
0
        $admin = Auth::admin()->get()->name;
        return Redirect::route('admin.index', ['admin' => $admin]);
    }
    return View::make('login');
}]);
Route::get('login', function () {
    if (Auth::user()->check()) {
        $user = Auth::user()->get()->name;
        return Redirect::route('admin.index', ['user' => $user]);
    } elseif (Auth::admin()->check()) {
        $admin = Auth::admin()->get()->name;
        return Redirect::route('admin.index', ['admin' => $admin]);
    }
    return View::make('login');
});
Route::post('/', ['as' => 'user.login', 'uses' => 'UsersController@login']);
Route::get('logout', ['as' => 'user.logout', 'uses' => 'UsersController@logout']);
Route::get('users/create', ['as' => 'users.create', 'uses' => 'UsersController@create']);
Route::post('users', ['as' => 'users.store', 'uses' => 'UsersController@store']);
Route::get('admin/{admin}', ['as' => 'admin.index', 'uses' => 'AdminsController@index']);
Route::resource('admin.users', 'UsersController', ['except' => ['edit', 'update']]);
Route::resource('admin.units', 'UnitsController');
Route::resource('admin.subjects', 'SubjectsController', ['except' => 'create']);
Route::get('admin/{admin}/subjects/{subject}/create', ['as' => 'admin.subjects.create', 'uses' => 'SubjectsController@create']);
Route::get('admin/{admin}/db_backup', ['as' => 'admin.db_backup', 'uses' => 'AdminsController@db_backup']);
Route::get('admin/{admin}/db_restore', ['as' => 'admin.db_restore', 'uses' => 'AdminsController@db_restore']);
Route::get('admin/{admin}/help', ['as' => 'admin.help', 'uses' => 'AdminsController@help']);
Route::get('admin/{admin}/transactions', ['as' => 'admin.transactions', 'uses' => 'AdminsController@transactions']);
Route::get('admin/{admin}/delete_transactions', ['as' => 'admin.delete.transactions', 'uses' => 'AdminsController@delete_transactions']);
Route::when('admin*', ['before' => 'auth']);
Beispiel #9
0
<?php

// Route filters
Route::when('admin/*', 'admin');
Route::when('*', 'trick.view_throttle');
// Route patterns
Route::pattern('tag_slug', '[a-z0-9\\-]+');
Route::pattern('trick_slug', '[a-z0-9\\-]+');
// Admin routes
Route::group(['prefix' => 'admin', 'namespace' => 'Controllers\\Admin'], function () {
    Route::controller('tags', 'TagsController', ['getIndex' => 'admin.tags.index', 'getView' => 'admin.tags.view']);
    Route::controller('categories', 'CategoriesController', ['getIndex' => 'admin.categories.index', 'getView' => 'admin.categories.view']);
    Route::controller('users', 'UsersController');
});
Route::group(['namespace' => 'Controllers'], function () {
    // Home routes
    Route::get('/', ['as' => 'browse.recent', 'uses' => 'BrowseController@getBrowseRecent']);
    Route::get('popular', ['as' => 'browse.popular', 'uses' => 'BrowseController@getBrowsePopular']);
    Route::get('comments', ['as' => 'browse.comments', 'uses' => 'BrowseController@getBrowseComments']);
    Route::get('about', ['as' => 'about', 'uses' => 'HomeController@getAbout']);
    // Trick routes
    Route::get('tricks/{trick_slug?}', ['as' => 'tricks.show', 'uses' => 'TricksController@getShow']);
    Route::post('tricks/{trick_slug}/like', ['as' => 'tricks.like', 'uses' => 'TricksController@postLike']);
    // Browse routes
    Route::get('categories', ['as' => 'browse.categories', 'uses' => 'BrowseController@getCategoryIndex']);
    Route::get('categories/{category_slug}', ['as' => 'tricks.browse.category', 'uses' => 'BrowseController@getBrowseCategory']);
    Route::get('tags', ['as' => 'browse.tags', 'uses' => 'BrowseController@getTagIndex']);
    Route::get('tags/{tag_slug}', ['as' => 'tricks.browse.tag', 'uses' => 'BrowseController@getBrowseTag']);
    // Search routes
    Route::get('search', 'SearchController@getIndex');
    // Sitemap route
Beispiel #10
0
<?php

/*
|--------------------------------------------------------------------------
| 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 Closure to execute when that URI is requested.
|
*/
Route::when('*', 'www');
Route::group(['domain' => Config::get('app.domain')], function () {
    Route::get('/notifs/{last}', ['as' => 'notifs', 'uses' => 'HomeController@notifs'])->before('auth');
    Route::get('/notifcount', ['as' => 'notifcount', 'uses' => 'HomeController@notifCount'])->before('auth');
    Route::get('/markasread/{id}', ['as' => 'markasread', 'uses' => 'HomeController@markAsRead'])->before('auth');
    Route::get('/deletenotify/{id}', ['as' => 'deletenotify', 'uses' => 'HomeController@deleteNotify'])->before('auth');
    Route::get('/', ['as' => 'home', 'uses' => 'HomeController@showWelcome']);
    Route::get('/search', ['as' => 'search', 'uses' => 'HomeController@search']);
    Route::get('/login', ['as' => 'login', 'uses' => 'HomeController@loginView'])->before('guest');
    Route::post('/login', ['uses' => 'HomeController@login'])->before('guest');
    Route::get('/register', ['as' => 'register', 'uses' => 'HomeController@registerView'])->before('guest');
    Route::post('/register', ['uses' => 'HomeController@register'])->before('guest');
    Route::get('/logout', ['as' => 'logout', 'uses' => 'HomeController@logout'])->before('auth');
    Route::get('/pickcomment/{id}', ['as' => 'pickcomment', 'uses' => 'PostController@pickComment'])->before('auth');
    Route::get('/removecomment', ['as' => 'removecomment', 'uses' => 'PostController@removeComment'])->before('auth');
    Route::get('/subtitle/create', ['as' => 'subtitle.create', 'uses' => 'SubtitleController@createSubtitleView'])->before('auth');
    Route::post('/subtitle/create', ['uses' => 'SubtitleController@createSubtitle'])->before('auth');
    Route::get('/subtitle/delete/{id}', ['as' => 'subtitle.delete', 'uses' => 'SubtitleController@deleteSubtitle'])->before('auth');
    Route::get('/post/delete/{id}', ['as' => 'post.delete', 'uses' => 'PostController@deletePost'])->before('auth');
Beispiel #11
0
<?php

Route::when('*', 'csrf', ['POST', 'PUT', 'PATCH', 'DELETE']);
Route::group(['prefix' => config('_auth.routes_prefix')], function () {
    Route::group(['middleware' => ['guest', 'honeypot']], function () {
        Route::get(config('_auth.login.route'), ['as' => 'login.index', 'uses' => 'Cerbero\\Auth\\Http\\Controllers\\AuthController@showLogin']);
        Route::post(config('_auth.login.route'), ['as' => 'login.store', 'uses' => 'Cerbero\\Auth\\Http\\Controllers\\AuthController@login']);
        Route::get(config('_auth.register.route'), ['as' => 'register.index', 'uses' => 'Cerbero\\Auth\\Http\\Controllers\\AuthController@showRegister']);
        Route::post(config('_auth.register.route'), ['as' => 'register.store', 'uses' => 'Cerbero\\Auth\\Http\\Controllers\\AuthController@register']);
        Route::get(config('_auth.recover.route'), ['as' => 'recover.index', 'uses' => 'Cerbero\\Auth\\Http\\Controllers\\AuthController@showRecover']);
        Route::post(config('_auth.recover.route'), ['as' => 'recover.store', 'uses' => 'Cerbero\\Auth\\Http\\Controllers\\AuthController@recover']);
        Route::get(config('_auth.reset.route') . '/{token}', ['as' => 'reset.index', 'uses' => 'Cerbero\\Auth\\Http\\Controllers\\AuthController@showReset']);
        Route::post(config('_auth.reset.route') . '/{token}', ['as' => 'reset.store', 'uses' => 'Cerbero\\Auth\\Http\\Controllers\\AuthController@reset']);
    });
    Route::group(['middleware' => 'auth'], function () {
        Route::get(config('_auth.logout.route'), ['as' => 'logout', 'uses' => 'Cerbero\\Auth\\Http\\Controllers\\AuthController@logout']);
    });
});
Beispiel #12
0
Route::pattern('any', '(.*)');
Route::get('css/{any}', 'MiscFileController@getCSS');
Route::get('js/{any}', 'MiscFileController@getJS');
Route::get('images/{any}', 'MiscFileController@getImg');
Route::get('addons/{any}', 'MiscFileController@getAddOn');
/*********** FILTER ***********/
Route::filter('office', function () {
    $path = Request::path();
    if ($path != 'office/login') {
        if (!SysUser::chkLogin()) {
            $re = Tools::reFalse(10003, '请先登录');
            return Response::json($re);
        }
    }
});
Route::when('office/*', 'office');
/*********** FILTER ***********/
/*********** IMG ***********/
Route::post('img', 'ImgController@postImg');
/*********** IMG ***********/
/*********** API ***********/
/* V1 */
Route::group(['domain' => Config::get('app.subdomain.api')], function () {
    /* APP START*/
    Route::get('app/config', 'AppController@getConfig');
    Route::get('app/download', 'AppController@getDownloadLink');
    Route::post('v0/app/feedback', 'AppController@postFeedback');
    /* APP END*/
    /* ME START*/
    Route::get('v0/user/me', 'MeController@me');
    Route::get('v0/user/me/notification', 'MeNotificationController@listNots');
Beispiel #13
0
<?php

/**
 * Register routes filter classes
 */
Route::filter('public.checkLocale', 'TypiCMS\\Filters\\PublicFilter@checkLocale');
Route::filter('admin.setLocale', 'TypiCMS\\Filters\\AdminFilter@setLocale');
Route::filter('visitor.publicAccess', 'TypiCMS\\Filters\\UsersFilter@publicAccess');
Route::filter('visitor.mayRegister', 'TypiCMS\\Filters\\UsersFilter@mayRegister');
Route::filter('user.auth', 'TypiCMS\\Filters\\UsersFilter@auth');
Route::filter('user.hasAccess', 'TypiCMS\\Filters\\UsersFilter@hasAccess');
Route::filter('user.inGroup', 'TypiCMS\\Filters\\UsersFilter@inGroup');
/**
 * Route filter "public"
 */
foreach (Config::get('app.locales') as $locale) {
    Route::when($locale, 'public.checkLocale');
    Route::when($locale . '/*', 'public.checkLocale');
}
/**
 * Route filter admin side
 */
Route::when('admin', 'admin.setLocale|user.auth|user.hasAccess');
Route::when('admin/*', 'admin.setLocale|user.auth|user.hasAccess');
Beispiel #14
0
<?php

/*
|--------------------------------------------------------------------------
| 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 Closure to execute when that URI is requested.
|
*/
Route::when('admin/*', 'csrf', ['post']);
Route::pattern('id', '[0-9]+');
Route::pattern('image', '([^\\s]+(\\.(?i)(jpg|png|gif|bmp|jpeg|tiff))$)');
Route::group(['namespace' => 'Controllers\\Admin', 'prefix' => 'admin'], function () {
    Route::group(['before' => 'auth'], function () {
        Route::group(['prefix' => 'api/v1', 'namespace' => 'Api\\V1'], function () {
            Route::post('roles', ['uses' => 'RoleController@store', 'as' => 'admin.api.v1.roles.store']);
            Route::post('articles', ['uses' => 'ArticleController@store', 'as' => 'admin.api.v1.articles.store']);
            Route::put('users/me-update', ['uses' => 'UserController@profileUpdate', 'as' => 'admin.api.v1.users.profile_update']);
            Route::post('article_states', ['uses' => 'StateController@store', 'as' => 'admin.api.v1.article_states.store']);
            Route::put('article_states/{id}', ['uses' => 'StateController@update', 'as' => 'admin.api.v1.article_states.update']);
            Route::post('roles', ['uses' => 'RoleController@store', 'as' => 'admin.api.v1.roles.store']);
            Route::post('articles', ['uses' => 'ArticleController@store', 'as' => 'admin.api.v1.articles.store']);
            Route::put('users/me-update', ['uses' => 'UserController@profileUpdate', 'as' => 'admin.api.v1.users.profile_update']);
            Route::put('articles/update', ['uses' => 'ArticleController@update', 'as' => 'admin.api.v1.articles.update']);
        });
        Route::get('/dash', ['uses' => 'DashboardController@index', 'as' => 'admin.dash.index']);
        Route::get('/logout', ['uses' => 'AuthController@getLogout', 'as' => 'admin.auth.logout']);
        Route::get('/me', ['uses' => 'UserController@meEdit', 'as' => 'admin.profile']);
Beispiel #15
0
Route::when('roadmap', 'detectLang');
Route::get('roadmap', function () {
    // Return about us page
    return View::make('site/static/roadmap');
});
Route::when('data-security', 'detectLang');
Route::get('data-security', function () {
    // Return about us page
    return View::make('site/static/data-security');
});
Route::when('devops', 'detectLang');
Route::get('devops', function () {
    // Return about us page
    return View::make('site/static/devops');
});
Route::when('videos', 'detectLang');
Route::get('videos', function () {
    // Return about us page
    return View::make('site/static/videos');
});
/* We don't use the default blog stuff
# Posts - Second to last set, match slug
Route::get('{postSlug}', 'BlogController@getView');
Route::post('{postSlug}', 'BlogController@postView');
*/
/** ------------------------------------------
 *  Authenticated User Routes
 *  ------------------------------------------
 */
Route::group(array('before' => 'auth'), function () {
    # Resource route for the cloud account API crendentials
Beispiel #16
0
});
Route::filter('RT', function () {
    if (!Session::has('user_type') || Session::get('user_type') != "RT") {
        return Redirect::to('/');
    }
});
Route::filter('SR', function () {
    if (!Session::has('user_type') || Session::get('user_type') != "SR") {
        return Redirect::to('/');
    }
});
Route::when('superadmin/*', 'SA');
Route::when('admin/*', 'AD');
Route::when('franchise/*', 'FR');
Route::when('retailer/*', 'RT');
Route::when('subretailer/*', 'SR');
/* user superadmins starts */
Route::controller('superadmin/dashboard', 'SuperadmindashboardController');
Route::controller('superadmin/sitesettings', 'SuperadminsitesettingsController');
Route::controller('superadmin/admin', 'SuperadminadminController');
Route::controller('superadmin/franchise', 'SuperadminfranchiseController');
Route::controller('superadmin/retailer', 'SuperadminretailerController');
Route::controller('superadmin/subretailer', 'SuperadminsubretailerController');
Route::controller('superadmin/creditdebit', 'SuperadmincreditdebitController');
Route::controller('superadmin', 'SuperadminController');
/* user superadmins ends */
/* user admins starts */
Route::controller('admin/dashboard', 'AdmindashboardController');
Route::controller('admin/franchise', 'AdminfranchiseController');
Route::controller('admin/retailer', 'AdminretailerController');
Route::controller('admin/subretailer', 'AdminsubretailerController');
Beispiel #17
0
<?php

/*
|--------------------------------------------------------------------------
| 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 Closure to execute when that URI is requested.
|
*/
Route::when('*', 'csrf', ['post', 'put', 'patch']);
foreach (File::allFiles(__DIR__ . '/routes') as $partial) {
    require_once $partial->getPathname();
}
Beispiel #18
0
|
*/
/**
 * Route::pattern('var','expresion_regular')
 *
 * Esta función, permite definirle una propiedad a una variable.
 *
 * Route::get('admin/sections/{id}', function ($id) { ... });	
 * En este caso, cada vez que se pase la variable id en la ruta, deberá ser si o si un numero.
 */
Route::pattern('id', '\\d+');
Route::get('zeta/{id}', function ($id) {
    return 'Accediendo a ' . $id;
});
// Filtro definido en
Route::when('*', 'csrf', ['post']);
// Por defecto tiene las funciones create,store,show,edit,update,destroy
// que se crean al crear el controlador desde linea de comando.
Route::resource('cities/localidades', 'cities\\LocalidadController');
Route::resource('cities/calles', 'cities\\CalleController');
Route::resource('people/personas', 'people\\PersonasController');
Route::resource('admin/users', 'UserController');
Route::get('home', function () {
    return view('admin/home');
});
Route::get('/aleator', function () {
    return view('aleator/aleator/index');
});
Route::get('/', function () {
    return view('welcome');
});
Beispiel #19
0
<?php

/*
|--------------------------------------------------------------------------
| 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 Closure to execute when that URI is requested.
|
*/
$categories = Category::all();
View::share('categories', $categories);
Route::when('products/view/*', 'auth');
Route::when('products/like/*', 'auth');
Route::controller('users', 'UserController');
Route::controller('products', 'ProductController');
Route::controller('/', 'HomeController');
Beispiel #20
0
    Route::resource('module-builder', 'Backend\\ModuleBuilderController');
    // For pages and posts
    Route::resource('pages', 'Components\\Posts\\Controllers\\Backend\\PostsController');
    Route::resource('page-categories', 'Components\\Posts\\Controllers\\Backend\\PostCategoriesController');
    Route::resource('posts', 'Components\\Posts\\Controllers\\Backend\\PostsController');
    Route::resource('post-categories', 'Components\\Posts\\Controllers\\Backend\\PostCategoriesController');
    Route::any('media-manager/create_folder', 'Components\\MediaManager\\Controllers\\Backend\\MediaManagerController@create_folder');
    Route::any('media-manager/folder_contents', 'Components\\MediaManager\\Controllers\\Backend\\MediaManagerController@folder_contents');
    Route::resource('media-manager', 'Components\\MediaManager\\Controllers\\Backend\\MediaManagerController');
    Route::post('theme-manager/apply/{id}', array('uses' => 'Components\\ThemeManager\\Controllers\\Backend\\ThemeManagerController@apply', 'as' => 'admin.theme-manager.apply'));
    Route::resource('theme-manager', 'Components\\ThemeManager\\Controllers\\Backend\\ThemeManagerController');
    Route::get('report-builder/module-fields/{id}', 'Components\\ReportBuilder\\Controllers\\Backend\\ReportBuilderController@getModuleFields');
    Route::resource('report-builder', 'Components\\ReportBuilder\\Controllers\\Backend\\ReportBuilderController');
    Route::get('report-generators/generate/{id}', 'Components\\ReportGenerator\\Controllers\\Backend\\ReportGeneratorController@getGenerate');
    Route::post('report-generators/generate/{id}', array('uses' => 'Components\\ReportGenerator\\Controllers\\Backend\\ReportGeneratorController@postGenerate', 'as' => 'admin.report-generators.generate'));
    Route::resource('report-generators', 'Components\\ReportGenerator\\Controllers\\Backend\\ReportGeneratorController');
    Route::resource('contact-categories', 'Components\\ContactManager\\Controllers\\Backend\\ContactCategoriesController');
    Route::resource('contact-manager', 'Components\\ContactManager\\Controllers\\Backend\\ContactController');
    Route::get('contact-manager/create/{form_id}', array('uses' => 'Components\\ContactManager\\Controllers\\Backend\\ContactController@create', 'as' => 'backend.contact-manager.create'));
    Route::get('contact-manager/{id}/{form_id}', array('uses' => 'Components\\ContactManager\\Controllers\\Backend\\ContactController@show', 'as' => 'backend.contact-manager.show'));
    Route::get('contact-manager/{id}/edit/{form_id}', array('uses' => 'Components\\ContactManager\\Controllers\\Backend\\ContactController@edit', 'as' => 'backend.contact-manager.edit'));
});
Route::when('backend/*', array('auth', 'auth.backend'));
Route::when('admin/*', array('auth'));
// Add the routes of installed modules
foreach (glob(base_path("app/Modules/*/routes.php")) as $route) {
    require_once $route;
}
foreach (glob(base_path("app/Modules/*/*/routes.php")) as $route) {
    require_once $route;
}
Beispiel #21
0
Route::filter('admin', function () {
    if (!Auth::user()->admin) {
        Session::flash('message', "No tiene Permisos para acceder a esta opción, si piensa que es un error por favor contacte con su administrador");
        return Redirect::to('/');
    }
});
// Filtro de las Api
Route::filter('api', function () {
    header('Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS');
    header('Access-Control-Allow-Origin: *');
    header('Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Authorization,  Key, Auth-Token');
    if (Request::method() != "OPTIONS") {
        if (Request::header("Auth-Token", null) != null) {
            $user = User::find(Crypt::decrypt(Request::header("Auth-Token")));
            Auth::setUser($user);
        } else {
            return Auth::onceBasic('email');
        }
    }
});
Route::filter('ajax', function () {
    if (!Request::ajax()) {
        return Response::make('Unauthorized', 401);
    }
});
// amarrando el filtro a todas las direcciones admin
Route::when('admin', 'auth|admin');
Route::when('admin/*', 'auth|admin');
//Mismo caso para API
Route::when('api/*', 'api');
Beispiel #22
0
<?php

Route::when('member/*', 'csrf', array('post'));
Route::group(['prefix' => 'member', 'namespace' => 'Modules\\Member\\Http\\Controllers', 'before' => 'auth'], function () {
    Route::get('/', ['as' => 'member', 'uses' => 'MemberController@index']);
    Route::get('account', ['as' => 'member.account', 'uses' => 'AccountController@index']);
    Route::post('account/update', ['as' => 'member.account.update', 'uses' => 'AccountController@update']);
    Route::group(['prefix' => 'publish'], function () {
        /*用户发布*/
        Route::get('/', ['as' => 'member.publish', 'uses' => 'PublishController@index']);
        /*我是卖家*/
        Route::group(['prefix' => 'saler'], function () {
            Route::get('/add/{goodscate}', ['as' => 'member.publish.saler.add', 'uses' => 'SalerController@add']);
            Route::post('/store/{goodscate}', ['as' => 'member.publish.saler.store', 'uses' => 'SalerController@store']);
            Route::get('/list/{status}/{goodcate}/', ['as' => 'member.publish.saler.list', 'uses' => 'SalerController@listsale']);
            Route::get('/edit/{id}/{goods}', ['as' => 'member.publish.saler.edit', 'uses' => "SalerController@edit"]);
            Route::get('/delete', ['as' => 'member.publish.saler.deletegoods', 'uses' => 'SalerController@deleteGoods']);
            Route::get('/upanddown', ['as' => 'member.publish.saler.upanddown', 'uses' => 'SalerController@upAndDown']);
            Route::get('/ajaxpagelist', ['as' => 'member.publish.saler.ajaxpagelist', 'uses' => 'SalerController@ajaxPageList']);
            Route::get('/bargain', ['as' => 'member.publish.saler.bargain', 'uses' => 'SalerController@bargain']);
            Route::get('/order', ['as' => 'member.publish.saler.order', 'uses' => 'SalerController@order']);
        });
        //买家Buyer
        Route::group(['prefix' => 'buyer'], function () {
            Route::get('/{type?}/add', ['as' => 'member.publish.buyer.add', 'uses' => 'BuyerController@add']);
            Route::get('/{type?}/list', ['as' => 'member.publish.buyer.list', 'uses' => 'BuyerController@glist']);
            Route::post('{type}/store', ['as' => 'member.publish.buyer.store', 'uses' => 'BuyerController@store']);
            Route::get('/{type?}/entrust', ['as' => 'member.publish.buyer.entrust', 'uses' => 'BuyerController@entrust']);
            Route::get('/{type?}/bargain', ['as' => 'member.publish.buyer.bargain', 'uses' => 'BuyerController@bargain']);
            Route::get('/{type?}/order', ['as' => 'member.publish.buyer.order', 'uses' => 'BuyerController@order']);
            Route::get('/{type}/delete', ['as' => 'member.publish.buyer.delete', 'uses' => 'BuyerController@delete']);
/*
 |--------------------------------------------------------------------------
 | 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 Closure to execute when that URI is requested.
 |
*/
// Route for application front end
Route::any('', 'AppController@showHome');
Route::any('/', array('as' => 'home', 'uses' => 'AppController@showHome'));
Route::any('followed/{user_id}', array('as' => 'followed', 'uses' => 'AppController@showFollowed'))->where('user_id', '[0-9]+');
Route::any('gallery/image/{image_id}', array('as' => 'image_id', 'uses' => 'GalleryController@showImage'))->where('image_id', '[0-9]+');
Route::any('gallery/{page?}', array('as' => 'gallery_page', 'uses' => 'GalleryController@gallery'))->where('page', '[0-9]+');
Route::any('404', array('as' => '404', 'uses' => 'AppController@show404'));
Route::any('terms-and-conditions', array('as' => 'terms-and-conditions', 'uses' => 'AppController@showTnc'));
// Routes for Ajax Based save/load
Route::post('registerUser', array('as' => 'registerUser', 'before' => 'csrf', 'uses' => 'UserDetailController@setUserDetails'));
// Admin routes
Route::get('admin', array('as' => 'admin', 'before' => 'auth', 'uses' => 'AdminController@adminShowHome'));
Route::get('admin/login', array('as' => 'admin_login', 'before' => 'guest', 'uses' => 'AdminController@adminLogin'));
Route::post('admin/login', array('as' => 'admin_login_submit', 'before' => 'guest', 'uses' => 'AdminController@adminLogin'));
Route::any('admin/logout', array('as' => 'admin_logout', 'uses' => 'AdminController@adminLogout'));
Route::get('/admin/gallery/{admin_gallery_page?}', array('as' => 'admin_gallery', 'before' => 'auth', 'uses' => 'AdminController@showGallery'))->where('admin_gallery_page', '[0-9]+');
Route::get('/admin/gallery/publish/{publish_photo_id}', array('as' => 'admin_publish_photo', 'before' => 'auth', 'uses' => 'AdminController@publishPhoto'))->where('publish_photo_id', '[0-9]+');
Route::get('/admin/gallery/unpublish/{unpublish_photo_id}', array('as' => 'admin_unpublish_photo', 'before' => 'auth', 'uses' => 'AdminController@unpublishPhoto'))->where('unpublish_photo_id', '[0-9]+');
Route::get('/admin/gallery/set-winner/{winner_photo_id}', array('as' => 'admin_winner_photo', 'before' => 'auth', 'uses' => 'AdminController@setWinnerPhoto'))->where('winner_photo_id', '[0-9]+');
Route::when('admin/*', 'admin');
Beispiel #24
0
/**
 * Passwort reset filter
 *
 * Forces the user to set a new password if the account is flagged for it
 */
Route::filter('password_reset_flag', function ($route) {
    if (Auth::check() && Auth::user()->getForcePasswordReset() && $route->getName() != 'auth.user.edit' && $route->getName() != 'auth.user.update' && $route->getName() != 'auth.logout') {
        return Redirect::route('auth.user.edit', Auth::user()->getId())->with('message', 'user.force_reset_set');
    }
});
/**
 * Attach the password reset flag to all routes
 */
Route::when('*', 'password_reset_flag');
Route::group(['prefix' => Config::get('auth::route_prefix')], function () {
    Route::when('/user/*/edit', 'auth');
    /**
     * Login routes
     */
    Route::get('/login', ['as' => 'auth.login', 'uses' => 'Ipunkt\\Auth\\LoginController@loginForm', 'before' => 'guest']);
    Route::post('/login', ['as' => 'auth.perform_login', 'uses' => 'Ipunkt\\Auth\\LoginController@login', 'before' => 'guest']);
    /**
     * logout routes
     */
    Route::get('/logout', ['as' => 'auth.logout', 'uses' => 'Ipunkt\\Auth\\LoginController@logout', 'before' => 'auth']);
    /**
     * Password reminder routes
     */
    Route::get('/remind', ['uses' => 'Ipunkt\\Auth\\ReminderController@request', 'as' => 'auth.remind', 'before' => 'guest']);
    Route::post('/remind', ['uses' => 'Ipunkt\\Auth\\ReminderController@perform', 'as' => 'auth.perform_remind', 'before' => 'guest']);
    Route::get('/reset/{token}', ['uses' => 'Ipunkt\\Auth\\ReminderController@reset', 'as' => 'auth.reset_password', 'before' => 'guest']);
<?php

/*
  |--------------------------------------------------------------------------
  | 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 Closure to execute when that URI is requested.
  |
*/
Route::when('*', 'csrf', array('post'));
Route::controller('home', 'home');
Route::controller('algo', 'algo');
Route::controller('graph', 'graph');
Route::get('/{option?}', array('uses' => 'Home@getIndex'));
Beispiel #26
0
<?php

/*
 * Laravel.JpRecipe Router
 */
\Route::when('auth/callback*', 'guest');
\Route::when('auth/login*', 'guest');
\Route::when('auth/logout*', 'auth');
\Route::when('*', 'csrf', ['post']);
\Route::when('webmaster/recipe*', 'post.once', ['post']);
\Route::when('webmaster/category*', 'post.once', ['post']);
\Route::get('faq', function () {
    $title = \Config::get('recipe.title') . "FAQ";
    \View::inject('title', $title);
    return \View::make('home.faq.index');
});
\Route::group(['namespace' => 'App\\Controllers'], function () {
    // for API
    \Route::group(['namespace' => 'Api', 'prefix' => 'api/v1'], function () {
        \Route::resource('recipe', 'RecipeController', ['only' => ['index', 'show']]);
    });
    \Route::group(['namespace' => 'WebMaster', 'before' => 'auth', 'prefix' => 'webmaster'], function () {
        \Route::get('/', ['uses' => 'HomeController@getIndex', 'as' => 'webmaster.index']);
        // recipe
        \Route::controller('recipe', 'RecipeController', ['getShow' => 'webmaster.recipe.show', 'getList' => 'webmaster.recipe.list', 'getForm' => 'webmaster.recipe.form', 'postConfirm' => 'webmaster.recipe.confirm', 'postApply' => 'webmaster.recipe.apply']);
        // category
        \Route::controller('category', 'CategoryController', ['getShow' => 'webmaster.category.show', 'getList' => 'webmaster.category.list', 'getForm' => 'webmaster.category.form', 'postConfirm' => 'webmaster.category.confirm', 'postApply' => 'webmaster.category.apply']);
    });
    //
    \Route::get('search', ['uses' => 'SearchController@getIndex', 'as' => 'search.index']);
    //
Beispiel #27
0
    if (!Auth::check()) {
        return $view->nest('commentForm', 'default/site/blog/comment_auth');
    }
    if (!$viewdata['canComment']) {
        return $view->nest('commentForm', 'default/site/blog/comment_perm');
    }
    return $view->nest('commentForm', 'default/site/blog/comment_form', array('post' => $viewdata['post']));
});
Route::filter('json', function () {
    Api::$type = 'json';
});
Route::filter('xml', function () {
    Api::$type = 'xml';
});
Route::when('json', 'json');
Route::when('xml', 'xml');
Route::filter('checkuser', function () {
    if (Auth::check()) {
        DB::update('UPDATE users SET last_activity = ? WHERE id = ?', array(date('Y-m-d H:i:s', time()), Auth::user()->id));
        if (!Request::ajax()) {
            Activity::log(array('contentID' => Confide::user()->id, 'contentType' => 'activity', 'description' => 'Page Loaded', 'details' => '<a href="' . $_SERVER['REQUEST_URI'] . '" target="_new" class="btn">link</a>', 'updated' => Confide::user()->id ? true : false));
        }
        $value = Cache::remember('valid_user', '1', function () {
            return Auth::user()->confirmed != '1' ? true : false;
        });
        if ($value) {
            Confide::logout();
            return Redirect::to('suspended');
        }
    }
});
Beispiel #28
0
/*
|--------------------------------------------------------------------------
| MOVIMENTOS
|--------------------------------------------------------------------------
*/
Route::resource('movimentos', 'MovimentosController');
Route::when('movimentos*', 'auth');
/*
|--------------------------------------------------------------------------
| CONFIGURAÇÕES
|--------------------------------------------------------------------------
*/
Route::get('settings/reset', array('uses' => 'SettingsController@reset'));
Route::get('settings/{module}', array('uses' => 'SettingsController@index'));
Route::resource('settings', 'SettingsController', array('names' => array('store' => 'settings.store')));
Route::when('settings*', 'auth');
// TEMPLATE
Route::get('/template', function () {
    return View::make('template');
});
// Confide routes
Route::get('users/forgot_password', 'UsersController@forgotPassword');
Route::post('users/forgot_password', 'UsersController@doForgotPassword');
Route::get('users/reset_password/{token}', 'UsersController@resetPassword');
Route::post('users/reset_password', 'UsersController@doResetPassword');
Route::group(array('before' => 'auth'), function () {
    Route::get('users/checkmail', array('uses' => 'UsersController@checkmail'));
    Route::get('users/checkusername', array('uses' => 'UsersController@checkusername'));
    Route::get('users/create', array('uses' => 'UsersController@create'));
    Route::get('users/{id}/delete', array('uses' => 'UsersController@destroy'));
    Route::get('users/{id}', array('uses' => 'UsersController@edit'));
Beispiel #29
0
/*
|--------------------------------------------------------------------------
| 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 Closure to execute when that URI is requested.
|
*/
Route::group(array('prefix' => 'admin'), function () {
    Route::get('account', 'AdminSettingController@getAccount');
    Route::post('account', 'AdminSettingController@postAccount');
    Route::get('password', 'AdminSettingController@getPassword');
    Route::post('password', 'AdminSettingController@postPassword');
    Route::get('login', 'AdminAuthController@getLogin');
    Route::post('login', 'AdminAuthController@postLogin');
    Route::get('logoutlogout', function () {
        Auth::logout();
        return Redirect::to('admin/login');
    });
    Route::get('reminder', 'AdminRemindersController@getRemind');
    Route::post('reminder', array('before' => 'csrf', 'uses' => 'AdminRemindersController@postRemind'));
    Route::get('reset/{token}', 'AdminRemindersController@getReset');
    Route::post('reset/{token}', 'AdminRemindersController@postReset');
    Route::group(array('before' => 'authAdmin|admin'), function () {
        Route::get('dashboard', 'AdminController@getDashboard');
    });
    Route::when('*', 'csrf', array('post', 'put', 'delete'));
});
Beispiel #30
0
<?php

/**
 * Register routes filter classes
 */
Route::filter('public.checkLocale', 'TypiCMS\\Filters\\PublicFilter@checkLocale');
Route::filter('admin.setLocale', 'TypiCMS\\Filters\\AdminFilter@setLocale');
Route::filter('visitor.publicAccess', 'TypiCMS\\Filters\\UsersFilter@publicAccess');
Route::filter('visitor.mayRegister', 'TypiCMS\\Filters\\UsersFilter@mayRegister');
Route::filter('user.auth', 'TypiCMS\\Filters\\UsersFilter@auth');
Route::filter('user.hasAccess', 'TypiCMS\\Filters\\UsersFilter@hasAccess');
Route::filter('user.inGroup', 'TypiCMS\\Filters\\UsersFilter@inGroup');
/**
 * Route filter "public"
 */
foreach (Config::get('app.locales') as $locale) {
    Route::when($locale, 'public.checkLocale');
    Route::when($locale . '/*', 'public.checkLocale');
}
/**
 * Route filter admin side
 */
Route::when('admin', 'admin.setLocale|user.auth|user.hasAccess');
Route::when('admin/*', 'admin.setLocale|user.auth|user.hasAccess');
Route::when('api', 'admin.setLocale');
Route::when('api/*', 'admin.setLocale');
Route::when('api', 'user.auth|user.hasAccess', ['post', 'put', 'patch', 'delete']);
Route::when('api/*', 'user.auth|user.hasAccess', ['post', 'put', 'patch', 'delete']);