pattern() 공개 정적인 메소드

Set a global where pattern on all routes.
public static pattern ( string $key, string $pattern ) : void
$key string
$pattern string
리턴 void
예제 #1
0
 /**
  * @param Route $route
  *
  * @return mixed
  */
 public function dispatch(Route $route)
 {
     $handler = $route->handler();
     if (!is_callable($handler) && $this->resolver !== null) {
         $handler = call_user_func($this->resolver, $handler);
     }
     if (is_callable($handler)) {
         return call_user_func_array($handler, $route->attributes());
     }
     throw new \ErrorException("Target specified for '{$route->pattern()}' cannot be called");
 }
예제 #2
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::pattern('id', '[0-9]+');
Route::pattern('uri_id', '[0-9]+');
Route::pattern('active', '(true|false)');
Route::pattern('hint', '(access-token|refresh-token)');
Route::pattern('scope_id', '[0-9]+');
Route::group(array("before" => "ssl"), function () {
    Route::get('/', "HomeController@index");
    Route::get('/discovery', "DiscoveryController@idp");
    /*
     * If the Claimed Identifier was not previously discovered by the Relying Party
     * (the "openid.identity" in the request was "http://specs.openid.net/auth/2.0/identifier_select"
     * or a different Identifier, or if the OP is sending an unsolicited positive assertion),
     * the Relying Party MUST perform discovery on the Claimed Identifier in
     * the response to make sure that the OP is authorized to make assertions about the Claimed Identifier.
     */
    Route::get("/{identifier}", "UserController@getIdentity");
    Route::get("/accounts/user/ud/{identifier}", "DiscoveryController@user")->where(array('identifier' => '[\\d\\w\\.\\#]+'));
    //op endpoint url
    Route::post('/accounts/openid2', 'OpenIdProviderController@endpoint');
    Route::get('/accounts/openid2', 'OpenIdProviderController@endpoint');
예제 #3
0
파일: general.php 프로젝트: andrims21/eBri
<?php

Route::pattern('slug', '[A-z0-9-]+');
Route::pattern('product', '[\\d+]+');
Route::pattern('branch', '[\\d+]+');
Route::get('ebriat', array('before' => 'csrf', function () {
    $home = new Andriynto\Ebri\Controllers\Home();
    return $home->accessToken();
}));
Route::get('', function () {
    $home = new Andriynto\Ebri\Controllers\Home();
    return $home->index();
});
Route::get('login', function () {
    $account = new Andriynto\Ebri\Controllers\Account();
    return $account->index();
});
//After Login
Route::get('dashboard', function () {
    $app = new Andriynto\Ebri\Controllers\App();
    return $app->index();
});
//Setting
Route::get('settings', function () {
});
Route::get('settings/branch', array('before' => array('ebri.permission:setting.view'), function () {
    $setting = new Andriynto\Ebri\Controllers\Setting();
    return $setting->index();
}));
Route::get('', array('before' => array('ebri.permission:setting.view'), function () {
    $setting = new Andriynto\Ebri\Controllers\Setting();
예제 #4
0
파일: routes.php 프로젝트: aziz-ka/bloc
|
| 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.
|
*/
if ($this->app->isLocal()) {
    Route::get('/_debugbar/assets/stylesheets', ['as' => 'debugbar-css', 'uses' => '\\Barryvdh\\Debugbar\\Controllers\\AssetController@css']);
    Route::get('/_debugbar/assets/javascript', ['as' => 'debugbar-js', 'uses' => '\\Barryvdh\\Debugbar\\Controllers\\AssetController@js']);
}
/**
 * Model binding into route
 */
Route::model('blogcategory', 'App\\BlogCategory');
Route::model('blog', 'App\\Blog');
Route::pattern('slug', '[a-z0-9- _]+');
Route::group(array('prefix' => 'admin'), function () {
    //All basic routes defined here
    Route::get('login', array('as' => 'admin-login', 'uses' => 'AuthController@getLogin'));
    Route::post('login', 'AuthController@postLogin');
    Route::get('register', array('as' => 'admin-register', 'uses' => 'AuthController@getRegister'));
    Route::post('register', 'AuthController@postRegister');
    Route::get('logout', array('as' => 'logout', 'uses' => 'AuthController@getLogout'));
});
Route::group(array('prefix' => 'admin', 'middleware' => 'SentinelAdmin'), function () {
    Route::get('/', array('as' => 'dashboard', 'uses' => 'ChandraController@showHome'));
    # Estimate Management
    Route::group(array('prefix' => 'estimates'), function () {
        Route::get('/', array('as' => 'estimates', 'uses' => 'EstimateController@getEstimates'));
        Route::get('create', array('as' => 'estimate/create', 'uses' => 'EstimateController@getCreate'));
        Route::post('create', 'EstimateController@postCreateOrUpdate');
예제 #5
0
<?php

Route::pattern('id', '[a-zA-Z0-9]+');
Route::group(array('before' => array('auth', 'setup')), function () {
    Route::get('surf/{type?}', 'BriskSurf\\Surf\\SurfController@getSurf')->where(array('type' => 'classic'));
    Route::group(array('before' => 'crsf'), function () {
        Route::post('surf/{type?}', 'BriskSurf\\Surf\\SurfController@postSurf')->where(array('type' => 'classic'));
    });
});
예제 #6
0
파일: routes.php 프로젝트: Tchilly/Poolarna
<?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.
|
*/
// Patterns
Route::pattern('id', '\\d+');
// Home
Route::get('/', function () {
    return view('index');
});
// Events
Route::resource('event', 'EventController');
// Participants
Route::resource('participant', 'ParticipantController');
// Users
// Authentication routes...
Route::get('auth/login', 'Auth\\AuthController@login');
Route::post('auth/login', 'Auth\\AuthController@authenticate');
Route::get('auth/logout', 'Auth\\AuthController@logout');
// Registration routes...
Route::get('auth/register', 'Auth\\AuthController@register');
Route::post('auth/register', 'Auth\\AuthController@create');
// API
예제 #7
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::resource('vehiculos', 'VehiculoController', ['only' => ['index', 'show']]);
Route::resource('fabricantes', 'FabricanteController', ['except' => ['edit', 'create']]);
Route::resource('fabricantes.vehiculos', 'FabricanteVehiculoController', ['except' => ['show', 'edit', 'create']]);
Route::pattern('inexistente', '.*');
Route::any('/{inexistente}', function () {
    return response()->json(['data' => 'Solicitud incorrecta.'], 400);
});
예제 #8
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 controller to call when that URI is requested.
|
*/
Route::pattern('id', '\\d+');
Route::pattern('pid', '\\d+');
Route::pattern('status', '[0-1]+');
Route::pattern('keyword', '[a-z0-9-]+');
Route::pattern('slug', '[a-zA-Z0-9-]+');
Route::pattern('nameDomain', '(www.kacana.com|kacana.com|dev.kacana.com|staging.kacana.com|www.kacana.vn|kacana.vn|dev.kacana.vn|staging.kacana.vn)');
Route::group(['prefix' => 'auth/'], function () {
    // Authentication routes...
    Route::get('login', array('as' => 'authGetLogin', 'uses' => 'Auth\\AuthController@getLogin'));
    Route::post('login', 'Auth\\AuthController@authLogin');
    Route::get('sign-out', 'Auth\\AuthController@getLogout');
    // Registration routes...
    Route::any('signup', array('as' => 'authGetSignup', 'uses' => 'Auth\\SignupController@signup'));
    Route::any('signup/socialLoginCallback', 'Auth\\SignupController@socialLoginCallback');
    Route::any('signup/facebookCallbackAllowPost', 'Auth\\SignupController@facebookCallbackAllowPost');
});
Route::any('/sitemap.xml', array('as' => 'sitemap', 'uses' => 'Client\\SitemapController@index'));
Route::any('/sitemap-tags.xml', array('as' => 'sitemap-tags.xml', 'uses' => 'Client\\SitemapController@sitemapTags'));
Route::any('/sitemap-products.xml', array('as' => 'sitemap-products.xml', 'uses' => 'Client\\SitemapController@sitemapProducts'));
Route::any('/sitemap-pages.xml', array('as' => 'sitemap-pages.xml', 'uses' => 'Client\\SitemapController@sitemapPages'));
/*********************************************************
예제 #9
0
*/
/*Route::get('/', function () { // '/' index
    return view('home');

   // return "hello world";
  //  return view('welcome');
});

Route::get('products', function () {    //localhost:8000/products
    return "je suis la liste des produits";
    //  return view('welcome');
});*/
use Illuminate\Http\Request;
Route::pattern('id', '[1-9][0-9]*');
Route::pattern('slug', '[a-z_-]*');
Route::pattern('id', '[1-9][0-9]*');
//proteger la page product l'id
//Route::get('contact','FrontController@showContact');
//Route::post('storeContact','FrontController@storeContact');
//Route::get('/product/foo',function(){echo "hello foo";});
//Route::get('foo',function(){echo "hello foo";});
//Route::get('post/{id}', function($id){
//return"id:$id";  });
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| This route group applies the "web" middleware group to every route
| it contains. The "web" middleware group is defined in your HTTP
| kernel and includes session state, CSRF protection, and more.
예제 #10
0
파일: routes.php 프로젝트: Grapheme/lipton
Route::group(array('before' => 'guest', 'prefix' => ''), function () {
    Route::post('signin', array('as' => 'signin', 'uses' => 'GlobalController@signin'));
    Route::post('signup', array('as' => 'signup', 'uses' => 'GlobalController@signup'));
    Route::get('activation', array('as' => 'activation', 'uses' => 'GlobalController@activation'));
});
/*
| Роуты, доступные для гостей и авторизованных пользователей
*/
Route::get('mod', array('before' => 'login', 'as' => 'login', 'uses' => 'GlobalController@loginPage'));
Route::get('logout', array('before' => 'auth', 'as' => 'logout', 'uses' => 'GlobalController@logout'));
#################################################################
/**
 * Support Multilanguage
 * @see README.md
 */
Route::pattern('lang', implode('|', array_keys(Config::get('app.locales'))))->defaults('lang', Config::get('app.locale'));
#################################################################
/***********************************************************************/
/******************** ЗАГРУЗКА РЕСУРСОВ ИЗ МОДУЛЕЙ *********************/
/***********************************************************************/
## For debug
$load_debug = 0;
## Reserved methods for return resourses of controller
$returnRoutes = "returnRoutes";
$returnActions = "returnActions";
$returnShortCodes = "returnShortCodes";
$returnExtFormElements = "returnExtFormElements";
$returnInfo = "returnInfo";
$returnMenu = "returnMenu";
## Find all controllers & load him resoures: routes, shortcodes & others...
$postfix = ".controller.php";
예제 #11
0
|
*/
// Demo ! loggin in as user id 3
//Auth::loginUsingId(3);
Route::get('/', 'WelcomeController@index');
Route::get('home', 'HomeController@index');
// Basic Auth
Route::get('auth/confirm/{token}', 'Auth\\AuthController@confirmEmail');
// Need to clean up
Route::controllers(['auth' => 'Auth\\AuthController', 'password' => 'Auth\\PasswordController']);
// Reset Email
Route::get('reset/email', 'EmailAddressController@getResetEmail');
Route::post('reset/email', 'EmailAddressController@postResetEmail');
Route::get('reset/email/confirm/{token}', 'EmailAddressController@confirmEmail');
// Patterns for Users
Route::pattern('username', '[a-zA-Z0-9_-]{3,16}');
// User
Route::get('users', 'UserController@index');
Route::get('@{username?}', 'UserController@show');
Route::get('edit/profile', 'UserController@editProfile');
Route::patch('update/profile', 'UserController@updateProfile');
Route::get('edit/description', 'UserController@editDesc');
Route::patch('update/description', 'UserController@updateDesc');
Route::get('account/email', 'UserController@set_email');
Route::get('account/password', 'UserController@set_password');
// Messages
Route::group(['prefix' => 'messages'], function () {
    Route::get('/', ['as' => 'messages', 'uses' => 'MessagesController@index']);
    Route::get('create', ['as' => 'messages.create', 'uses' => 'MessagesController@create']);
    Route::post('/', ['as' => 'messages.store', 'uses' => 'MessagesController@store']);
    Route::get('{id}', ['as' => 'messages.show', 'uses' => 'MessagesController@show']);
예제 #12
0
파일: RouteTest.php 프로젝트: Jud/Slim
 /**
  * Route should set pattern, and the Route pattern should not
  * retain the leading slash.
  */
 public function testRouteSetsPatternWithoutLeadingSlash()
 {
     $route = new Route('/foo/bar', function () {
     });
     $this->assertEquals('foo/bar', $route->pattern());
 }
예제 #13
0
Route::model('role', 'Role');
Route::model('hotel', 'Hotel');
Route::model('ticket', 'Ticket');
Route::model('userpic', 'Userpic');
/** ------------------------------------------
 *  Route constraint patterns
 *  ------------------------------------------
 */
Route::pattern('comment', '[0-9]+');
Route::pattern('post', '[0-9]+');
Route::pattern('hotel', '[0-9]+');
Route::pattern('ticket', '[0-9]+');
Route::pattern('user', '[0-9]+');
Route::pattern('role', '[0-9]+');
Route::pattern('token', '[0-9a-z]+');
Route::pattern('userpic', '[0-9a-z]+');
/** ------------------------------------------
 *  Admin Routes
 *  ------------------------------------------
 */
Route::group(array('prefix' => 'admin', 'before' => 'auth'), function () {
    # Ticket Management
    Route::get('tickets/{ticket}/show', 'AdminTicketsController@getShow');
    Route::get('tickets/{ticket}/edit', 'AdminTicketsController@getEdit');
    Route::post('tickets/{ticket}/edit', 'AdminTicketsController@postEdit');
    Route::get('tickets/{ticket}/delete', 'AdminTicketsController@getDelete');
    Route::post('tickets/{ticket}/delete', 'AdminTicketsController@postDelete');
    Route::controller('tickets', 'AdminTicketsController');
    # Hotel Management
    Route::get('hotels/{hotel}/show', 'AdminHotelsController@getShow');
    Route::get('hotels/{hotel}/edit', 'AdminHotelsController@getEdit');
예제 #14
0
파일: routes.php 프로젝트: kacana/admin
/*
|--------------------------------------------------------------------------
| 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::pattern('id', '[0-9]+');
Route::pattern('pid', '[0-9]+');
Route::pattern('status', '[0-1]+');
Route::pattern('keyword', '[a-z0-9-]+');
Route::pattern('envDomain', '(dev.|staging.|product.|)');
Route::pattern('nameDomain', '(kacana.com)');
// Authentication routes...
Route::get('auth/login', 'Auth\\AuthController@getLogin');
Route::post('auth/login', 'Auth\\AuthController@authLogin');
Route::get('auth/logout', 'Auth\\AuthController@getLogout');
// Registration routes...
Route::get('auth/register', 'Auth\\AuthController@getRegister');
Route::post('auth/register', 'Auth\\AuthController@postRegister');
Route::get('/dashboard', 'WelcomeController@index');
/*********************************************************
 *
 *
 *                  ROUTE FOR ADMIN MODULE
 *
 *
 *
예제 #15
0
        get('/{id}', ['as' => 'index', 'uses' => 'AdminProductsController@images']);
        get('create/{id}', ['as' => 'create', 'uses' => 'AdminProductsController@createImage']);
        post('store/{id}', ['as' => 'store', 'uses' => 'AdminProductsController@storeImage']);
        get('delete/{id}', ['as' => 'delete', 'uses' => 'AdminProductsController@deleteImage']);
    });
    Route::group(['prefix' => 'users', 'as' => 'users.'], function () {
        get('/', ['as' => 'index', 'uses' => 'AdminUsersController@index']);
    });
    Route::group(['prefix' => 'orders', 'as' => 'orders.'], function () {
        get('/', ['as' => 'index', 'uses' => 'AdminOrdersController@index']);
        get('view/{id}', ['as' => 'view', 'uses' => 'AdminOrdersController@view']);
        put('update_status/{id}', ['as' => 'update_status', 'uses' => 'AdminOrdersController@updateStatus']);
    });
});
Route::group(['prefix' => '/', 'as' => 'store.'], function () {
    Route::pattern('qtd', '[0-9]+');
    Route::get('home', ['as' => 'index', 'uses' => 'StoreController@index']);
    Route::get('/', ['as' => 'index', 'uses' => 'StoreController@index']);
    Route::get('category/{id}', ['as' => 'category', 'uses' => 'StoreController@category']);
    Route::get('product/{id}', ['as' => 'product', 'uses' => 'StoreController@product']);
    Route::get('tag/{id}', ['as' => 'tag', 'uses' => 'StoreController@tag']);
    Route::get('cart', ['as' => 'cart', 'uses' => 'CartController@index']);
    Route::get('cart/add/{id}', ['as' => 'cart.add', 'uses' => 'CartController@add']);
    Route::get('cart/delete/{id}', ['as' => 'cart.delete', 'uses' => 'CartController@delete']);
    Route::put('cart/update/{id}', ['as' => 'cart.update', 'uses' => 'CartController@update']);
    Route::get('cart/clean', ['as' => 'cart.clean', 'uses' => 'CartController@cleanCart']);
    Route::get('pagseguro/retorno', ['as' => 'pagseguro.retorno', 'uses' => 'CheckoutController@retornoPagSeguro']);
    //rotas com autenticacao
    Route::group(['middleware' => 'auth'], function () {
        Route::get('checkout/place_order', ['as' => 'checkout.place', 'uses' => 'CheckoutController@place']);
        Route::get('account/orders', ['as' => 'account.orders', 'uses' => 'AccountController@orders']);
예제 #16
0
<?php

/****************   Model binding into route **************************/
Route::model('language', 'App\\Language');
Route::model('user', 'App\\User');
Route::pattern('id', '[0-9]+');
Route::pattern('slug', '[0-9a-z-_]+');
/***************    Site routes  **********************************/
Route::get('/', 'ProductController@index');
Route::get('home', ['as' => 'home', 'uses' => 'ProductController@index']);
Route::get('about', 'PagesController@about');
Route::group(['middleware' => 'auth'], function () {
    Route::get('shoppingcart', ['as' => 'shoppingcart', 'uses' => 'shoppingcartcontroller@index']);
    Route::post('addtocart', 'ShoppingCartItemController@add');
    Route::post('removefromcart', 'ShoppingCartItemController@remove');
    Route::post('applycoupon', 'CouponController@apply');
    Route::post('placeorder', 'TransactionController@placeOrder');
    Route::get('orderhistory', 'TransactionController@history');
});
Route::controllers(['auth' => 'Auth\\AuthController', 'password' => 'Auth\\PasswordController']);
/***************    Admin routes  **********************************/
Route::group(['prefix' => 'admin', 'middleware' => 'auth'], function () {
});
예제 #17
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 Closure to execute when that URI is requested. 
| 
*/
// Pour vérifier votre configuration, décommenter la ligne ci-dessous :
// phpinfo();exit;
// Accueil
Route::get('/', 'HomeController@searchBar');
// Résultats
Route::post('/', 'HomeController@searchResultForm');
Route::pattern('q', '[^/]+');
Route::pattern('resultsPerPage', '[1-9][0-9]*');
Route::pattern('page', '[1-9][0-9]*');
Route::get('/{q}', 'HomeController@searchResult');
Route::get('/{page}/{q}/{resultsPerPage?}', 'HomeController@searchResult');
// Clic sur un lien sortant
Route::model('crawledContent', 'CrawledContent');
Route::get('/out/{q}/{crawledContent}', 'HomeController@goOut');
Route::get('/delete/{crawledContent}', 'HomeController@delete');
Route::get('/delete/confirm/{crawledContent}', 'HomeController@deleteConfirm');
// Ajout manuel d'une URL
Route::post('/add-url', 'HomeController@addUrl')->before('csrf');
Route::get('/error/wrong-token', 'BaseController@wrongToken');
// Résultats les plus populaires
Route::get('/most-popular/{page}/{resultsPerPage?}', 'HomeController@mostPopular');
// Résultats des précédentes recherches
Route::get('/history/{page}/{resultsPerPage?}', 'HomeController@history');
// Auto-complétion
예제 #18
0
파일: routes.php 프로젝트: XDocker/app
Route::model('ticket_comments', 'TicketComments');
Route::model('engine_logs', 'EngineLog');
/** ------------------------------------------
 *  Route constraint patterns
 *  ------------------------------------------
 */
Route::pattern('comment', '[0-9]+');
Route::pattern('post', '[0-9]+');
Route::pattern('subscriber', '[0-9]+');
Route::pattern('user', '[0-9]+');
Route::pattern('role', '[0-9]+');
Route::pattern('token', '[0-9a-z]+');
Route::pattern('account', '[0-9]+');
Route::pattern('ticket', '[0-9]+');
Route::pattern('deployment', '[0-9]+');
Route::pattern('enginelog', '[0-9]+');
/** ------------------------------------------
 *  Admin Routes
 *  ------------------------------------------
 */
Route::group(array('prefix' => 'admin', 'before' => 'auth'), function () {
    # Comment Management
    Route::get('comments/{comment}/edit', 'AdminCommentsController@getEdit');
    Route::post('comments/{comment}/edit', 'AdminCommentsController@postEdit');
    Route::get('comments/{comment}/delete', 'AdminCommentsController@getDelete');
    Route::post('comments/{comment}/delete', 'AdminCommentsController@postDelete');
    Route::controller('comments', 'AdminCommentsController');
    # Blog Management
    Route::get('blogs/{post}/show', 'AdminBlogsController@getShow');
    Route::get('blogs/{post}/edit', 'AdminBlogsController@getEdit');
    Route::post('blogs/{post}/edit', 'AdminBlogsController@postEdit');
예제 #19
0
<?php

Route::pattern('image', '(?P<parent>[0-9]{2}-[\\pL-\\pN\\._-]+)-(?P<suffix>img-[0-9]{2}.png)');
Route::get('/', ['as' => 'index', 'uses' => 'WelcomeController@index']);
Route::get('home', ['as' => 'home', 'uses' => 'WelcomeController@home']);
Route::get('locale', ['as' => 'locale', 'uses' => 'WelcomeController@locale']);
/* Documents */
Route::get('docs/{image}', ['as' => 'documents.image', 'uses' => 'DocumentsController@image']);
Route::get('docs/{file?}', ['as' => 'documents.show', 'uses' => 'DocumentsController@show']);
/* Forum */
Route::get('tags/{id}/articles', ['as' => 'tags.articles.index', 'uses' => 'ArticlesController@index']);
Route::put('articles/{id}/pick', 'ArticlesController@pickBest');
Route::resource('articles', 'ArticlesController');
/* Attachments */
Route::resource('files', 'AttachmentsController', ['only' => ['store', 'destroy']]);
/* Comments */
Route::resource('comments', 'CommentsController', ['only' => ['store', 'update', 'destroy']]);
/* User Registration */
Route::get('auth/register', ['as' => 'users.create', 'uses' => 'UsersController@create']);
Route::post('auth/register', ['as' => 'users.store', 'uses' => 'UsersController@store']);
/* Social Login */
Route::get('social/{provider}', ['as' => 'social.login', 'uses' => 'SocialController@execute']);
/* Session */
Route::get('auth/login', ['as' => 'sessions.create', 'uses' => 'SessionsController@create']);
Route::post('auth/login', ['as' => 'sessions.store', 'uses' => 'SessionsController@store']);
Route::get('auth/logout', ['as' => 'sessions.destroy', 'uses' => 'SessionsController@destroy']);
/* Password Reminder */
Route::get('auth/remind', ['as' => 'remind.create', 'uses' => 'PasswordsController@getRemind']);
Route::post('auth/remind', ['as' => 'remind.store', 'uses' => 'PasswordsController@postRemind']);
Route::get('auth/reset/{token}', ['as' => 'reset.create', 'uses' => 'PasswordsController@getReset']);
Route::post('auth/reset', ['as' => 'reset.store', 'uses' => 'PasswordsController@postReset']);
예제 #20
0
Route::any("/signin", "TravelerController@signIn");
Route::any("/signup", "TravelerController@signUp");
Route::any("/signout", "TravelerController@signOut");
Route::get("/me", "TravelerController@myprofile");
Route::get("/me/books", "TravelerController@mybooks");
Route::post("/me/book/new", "BookController@create");
Route::get("/me/book/edit/{bid}", "BookController@edit");
Route::post("/ajax/newbooks", "BookController@getNew");
Route::post("/ajax/popularbooks", "BookController@getPopular");
Route::post("/ajax/book", "ElementController@saveBook");
Route::post("/ajax/chapters/{bid}", "ChapterController@getRaw");
Route::post("/ajax/chapterprev/{chid}", "ChapterController@getPrev");
Route::post("/ajax/elements", "ElementController@getRaw");
Route::group(array('prefix' => 'traveler'), function () {
    Route::get('{uid}', 'TravelerController@travelers');
    Route::pattern('uid', '[0-9]+');
    Route::get('{uid}/books', 'TravelerController@books');
});
Route::get("/explore", "BookController@explore");
Route::group(array('prefix' => 'book'), function () {
    //Route::get('{bid}', 'BookController@redirect');
    Route::get('{bid}/{name?}', 'BookController@get');
    Route::get('all', 'BookController@get');
    Route::get('{bid}/{name?}/chapter/{chid?}', 'ChapterController@get');
    Route::post('{bid}/{name?}/chapter/new', 'ChapterController@new');
});
Route::group(array("before" => "auth"), function () {
    Route::get('/', function () {
        return Redirect::to('me/');
    });
    Route::get('/signout', 'TravelerController@signout');
<?php

$apiPrefix = '/api';
Route::get($apiPrefix . '/ping', function () {
    return Response::json('pong');
});
Route::filter('api_auth', '\\Gihyo\\BookReservation\\Filter\\ApiAuthFilter');
Route::pattern('reservation_code', '[a-zA-Z0-9\\-]+');
Route::group(['before' => 'api_auth'], function () use($apiPrefix) {
    $controller = '\\Gihyo\\BookReservation\\Controller\\ReservationController';
    Route::post($apiPrefix . '/reservation', $controller . '@create');
    Route::get($apiPrefix . '/reservations', $controller . '@index');
    Route::put($apiPrefix . '/reservation/{reservation_code}', $controller . '@update');
    Route::delete($apiPrefix . '/reservation/{reservation_code}', $controller . '@delete');
});
예제 #22
0
         Route::get('page/profile.html', ['uses' => __cmf_general_controller_class() . '@getAdminProfile']);
         Route::put('page/profile', ['as' => 'cmf_profile', 'uses' => __cmf_general_controller_class() . '@updateAdminProfile']);
         // Custom Pages
         Route::get('page/about.html', function () {
             return view('cmf::page.about');
         });
         Route::get('page/{page}.html', ['uses' => __cmf_general_controller_class() . '@getPage']);
     });
     // Custom Pages
     Route::get('page/{page}', ['as' => 'cmf_page', 'uses' => __cmf_general_controller_class() . '@loadJsApp']);
     // Switch locales
     Route::get('switch_locale/{locale}', ['uses' => __cmf_general_controller_class() . '@switchLocale']);
     // Clean cache
     Route::get('cache/clean', ['uses' => __cmf_general_controller_class() . '@cleanCache']);
 });
 Route::pattern('table_name', '[a-z]+([_a-z0-9]*[a-z0-9])?');
 // Scaffold pages and templates
 Route::group(['prefix' => 'resource', 'middleware' => [ValidateModel::class, ValidateAdmin::class]], function () {
     Route::get('{table_name}', ['as' => 'cmf_items_table', 'uses' => __cmf_general_controller_class() . '@loadJsApp']);
     Route::get('{table_name}/create', ['as' => 'cmf_item_add_form', 'uses' => __cmf_general_controller_class() . '@loadJsApp']);
     Route::get('{table_name}/details/{id}', ['as' => 'cmf_item_details', 'uses' => __cmf_general_controller_class() . '@loadJsApp']);
     Route::get('{table_name}/edit/{id}', ['as' => 'cmf_item_edit_form', 'uses' => __cmf_general_controller_class() . '@loadJsApp']);
 });
 // Scaffold API
 Route::group(['prefix' => 'api', 'middleware' => [AjaxOnly::class, ValidateModel::class, ValidateAdmin::class]], function () {
     Route::get('{table_name}/service/templates', ['as' => 'cmf_api_get_templates', 'uses' => __cmf_scaffold_api_controller_class() . '@getTemplates']);
     Route::get('{table_name}/list', ['as' => 'cmf_api_get_items', 'uses' => __cmf_scaffold_api_controller_class() . '@getItemsList']);
     Route::get('{table_name}/service/options', ['as' => 'cmf_api_get_options', 'uses' => __cmf_scaffold_api_controller_class() . '@getOptions']);
     Route::post('{table_name}', ['as' => 'cmf_api_create_item', 'uses' => __cmf_scaffold_api_controller_class() . '@addItem']);
     Route::get('{table_name}/service/defaults', ['as' => 'cmf_api_get_item', 'uses' => __cmf_scaffold_api_controller_class() . '@getItemDefaults']);
     Route::get('{table_name}/{id}', ['as' => 'cmf_api_get_item', 'uses' => __cmf_scaffold_api_controller_class() . '@getItem']);
예제 #23
0
Route::get('getUploadForm', 'GoogleAuth@getUploadForm');
Route::get('notif', 'MahasiswaController@notifications');
Route::post('addPost', 'PostController@store');
Route::get('showPost/kelas/{kode}/grup/{kodeGrup}', 'PostController@getPost');
Route::get('showPostByID/{id}', 'PostController@getPostbyId');
Route::post('updatePost/{id}', 'PostController@updatePost');
Route::post('deletePost/{id}', 'PostController@deletePost');
Route::post('addKomentar/{id}', 'KomentarController@store');
Route::get('showKomentarByID/{id}', 'KomentarController@getKomentarbyId');
Route::post('updateKomentar/{id}', 'KomentarController@updateKomentar');
Route::post('deleteKomentar/{id}', 'KomentarController@deleteKomentar');
Route::post('addPhoto/{id}', 'MahasiswaController@addPhoto');
Route::post('addMemberGrup/{id}/{notif_id}', 'GrupController@addMember');
Route::post('inviteDecline/{id}', 'GrupController@declineMember');
Route::resource('add-grup', 'GrupController');
Route::pattern('folderId', '.+');
Route::get('storage/folders/{folderId}', 'GoogleAuth@getChildList');
Route::post('addtugas/{id}', 'TugasController@store');
Route::get('showTugas/{kode}', 'TugasController@show');
Route::get('showTugasById/{id}', 'TugasController@showById');
Route::post('updateTugas/{id}', 'TugasController@update');
Route::post('deleteTugas/{id}', 'TugasController@deleteTugas');
Route::post('kumpulTugas/{kelas}/{fileId}/{fileName}/{tugasId}', 'GoogleAuth@kumpulTugas');
Route::post('addPengumuman/{id}', 'PengumumanController@store');
Route::get('showPengumuman/{kode}', 'PengumumanController@show');
Route::get('showPengumumanById/{id}', 'PengumumanController@showById');
Route::post('updatePengumuman/{id}', 'PengumumanController@update');
Route::post('deletePengumuman/{id}', 'PengumumanController@deletePengumuman');
//Mahasiswa - Home - Profil
Route::get('u/mahasiswa', 'MahasiswaPageController@showHome');
Route::get('u/mahasiswa/{id}/profil', 'MahasiswaPageController@showProfile');
예제 #24
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', 'password' => 'Auth\\PasswordController']);
Route::pattern('id', '[0-9+]');
Route::get('/', 'StoreController@index');
Route::get('category/{id}', ['as' => 'store.category', 'uses' => 'StoreController@category']);
Route::get('product/{id}', ['as' => 'store.product', 'uses' => 'StoreController@product']);
Route::get('cart', ['as' => 'cart', 'uses' => 'CartController@index']);
Route::get('cart/add/{id}', ['as' => 'cart.add', 'uses' => 'CartController@add']);
Route::get('cart/destroy/{id}', ['as' => 'cart.destroy', 'uses' => 'CartController@destroy']);
Route::group(['middleware' => 'auth'], function () {
    Route::get('checkout/placeOrder', ['as' => 'checkout.place', 'uses' => 'CheckoutController@place']);
    Route::get('account/orders', ['as' => 'account.orders', 'uses' => 'AccountController@orders']);
});
Route::get('categories/', ['as' => 'categories', 'uses' => 'CategoriesController@index']);
Route::get('categories/create', ['as' => 'categories.create', 'uses' => 'CategoriesController@create']);
Route::get('categories/{id}/edit', ['as' => 'categories.edit', 'uses' => 'CategoriesController@edit']);
Route::get('categories/{id}/destroy', ['as' => 'categories.destroy', 'uses' => 'CategoriesController@destroy']);
Route::put('categories/{id}/update', ['as' => 'categories.update', 'uses' => 'CategoriesController@update']);
Route::post('categories/', ['as' => 'categories.store', 'uses' => 'CategoriesController@store']);
Route::get('products/', ['as' => 'products', 'uses' => 'ProductsController@index']);
예제 #25
0
파일: Url.php 프로젝트: fjinb/think
 protected static function checkRoute($url, $vars, $domain)
 {
     // 获取路由定义
     $rules = Route::any();
     // 全局变量规则
     $pattern = Route::pattern();
     foreach ($rules as $rule => $val) {
         if (!empty($val['routes'])) {
             // 匹配到路由分组
             foreach ($val['routes'] as $key => $route) {
                 if (is_numeric($key)) {
                     $key = array_shift($route);
                 }
                 $check = isset($route[2]) ? array_merge($pattern, $route[2]) : $pattern;
                 $route = $route[0];
                 $route = is_array($route) ? $route[0] : $route;
                 $result = $rule . Config::get('pathinfo_depr') . $key;
                 if ($route == $url && self::checkPattern($result, $vars, $check)) {
                     return $result;
                 }
             }
         } else {
             if (is_numeric($rule)) {
                 $rule = array_shift($val);
             }
             $route = $val['route'];
             $route = is_array($route) ? $route[0] : $route;
             $check = isset($val['pattern']) ? array_merge($pattern, $val['pattern']) : $pattern;
             if ($route == $url && self::checkPattern($rule, $vars, $check)) {
                 return $rule;
             }
         }
     }
     return false;
 }
예제 #26
0
<?php

/*
|--------------------------------------------------------------------------
| Module Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for the module.
| 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::pattern('categories', '\\d+');
Route::group(['middleware' => 'permission'], function () {
    Route::group(['prefix' => 'admin'], function () {
        Route::get('categories/{page}', ['uses' => 'CategoriesBackendController@index', 'as' => 'admin.categories.pagination']);
        Route::post('categories/massDestroy', ['uses' => 'CategoriesBackendController@massDestroy', 'as' => 'admin.categories.massDestroy']);
        Route::get('categories/{groupSlug}', ['uses' => 'CategoriesBackendController@index', 'as' => 'admin.categories.index']);
        Route::get('categories/create/{groupSlug}', ['uses' => 'CategoriesBackendController@create', 'as' => 'admin.categories.create']);
        Route::post('categories', ['uses' => 'CategoriesBackendController@store', 'as' => 'admin.categories.store']);
        Route::get('categories/{categories}', ['uses' => 'CategoriesBackendController@show', 'as' => 'admin.categories.show']);
        Route::get('categories/{categories}/edit', ['uses' => 'CategoriesBackendController@edit', 'as' => 'admin.categories.edit']);
        Route::put('categories/{categories}', ['uses' => 'CategoriesBackendController@update', 'as' => 'admin.categories.update']);
        Route::delete('categories/{categories}', ['uses' => 'CategoriesBackendController@destroy', 'as' => 'admin.categories.destroy']);
    });
});
/*

|        | GET|HEAD                       | admin/categories                                      | admin.categories.index              | App\Modules\Categories\Http\Controllers\CategoriesBackendController@index                 | permission |
|        | GET|HEAD                       | admin/categories/create                               | admin.categories.create             | App\Modules\Categories\Http\Controllers\CategoriesBackendController@create                | permission |
|        | POST                           | admin/categories                                      | admin.categories.store              | App\Modules\Categories\Http\Controllers\CategoriesBackendController@store                 | permission |
예제 #27
0
<?php

\Event::listen('illuminate.query', function ($query) {
    var_dump($query);
});
use Cartalyst\Sentinel\Laravel\Facades\Sentinel;
use Illuminate\Support\Facades\Redirect;
// Disable checkpoints (throttling, activation) for demo purposes
Route::pattern('account_id', '[0-9]+');
Route::pattern('token', '[0-9a-z]+');
Sentinel::enableCheckpoints();
# Admin Routes
Route::group(['prefix' => 'admin', 'middleware' => ['admin']], function () {
    Route::get('/', ['uses' => 'Admin\\AdminController@getHome']);
    //users
    Route::resource('users', 'Admin\\UsersController');
    Route::group(['prefix' => 'users'], function () {
        Route::get('{id}/deactivate', 'Admin\\UsersController@deactivate')->where('id', '\\d+');
        Route::get('{id}/activate', 'Admin\\UsersController@activate')->where('id', '\\d+');
    });
    // roles
    Route::resource('roles', 'Admin\\RolesController', array('except' => array('show')));
    //categories
    Route::resource('categories', 'Admin\\CategoriesController');
    //orders
    Route::resource('orders', 'Admin\\OrdersController');
    //orderItem
    Route::resource('orderitem', 'Order\\OrderItemController', array('except' => array('delete', 'destroy')));
    Route::group(['prefix' => 'settings'], function () {
        Route::resource('approval', 'Settings\\ApprovalController', ['except' => 'show']);
        Route::resource('vendor', 'Settings\\VendorController', ['except' => 'show']);
예제 #28
0
Route::post('office/loginform', 'OfficeController@Post_Office_Login_Page');
Route::get('office/search', 'OfficeController@View_Search_Page');
Route::get('office/recent', 'OfficeController@View_Recently_Updated');
Route::post('office/search', 'OfficeController@Post_Search_Page');
Route::get('office/searching', 'OfficeController@Post_Searching_Page');
Route::post('office/searching', 'OfficeController@Post_Searching_Page');
Route::get('office/results', 'OfficeController@View_Search_Results');
Route::post('office/results', 'OfficeController@Post_Search_Results');
Route::any('office/clearsearch', 'OfficeController@View_Clearout_Search_Results');
Route::get('office/view/{file}', 'OfficeController@View_Document');
Route::get('office/view/{file}/{step}', 'OfficeController@View_Document_Step');
Route::get('office/checkclientupdated/{file}/{lastupdate}', 'OfficeController@CheckForClientUpdate');
Route::pattern('step_id', '[0-9]+');
Route::pattern('lastupdate', '[0-9]+');
Route::pattern('file', '[a-zA-Z]+[0-9]+\\.[0-9]+');
Route::pattern('step', 'step[0-9]+');
/**
 * Merchant: Close Client File
 */
Route::get('office/merchant/close', 'OfficeController@View_MerchantCloseFile');
/**
 * Step 1: Signup
 */
Route::get('office/merchant/', 'OfficeController@View_Merchant1');
Route::get('office/merchant/signup', 'OfficeController@View_Merchant1');
Route::get('office/merchant/signup/{file}', 'OfficeController@View_Merchant1');
/**
 * Step 2: Services
 */
Route::get('office/merchant/cart', 'OfficeController@View_Merchant2');
Route::get('office/merchant/cart/{file}', 'OfficeController@View_Merchant2');
예제 #29
0
<?php

//后台路由组
Route::group(['prefix' => 'admin', 'middleware' => 'auth'], function () {
    Route::pattern('id', '[0-9]+');
    Route::pattern('id2', '[0-9]+');
    #Admin Dashboard
    Route::get('dashboard', 'Admin\\DashboardController@index');
    #Language
    Route::get('language', 'Admin\\LanguageController@index');
    Route::get('language/create', 'Admin\\LanguageController@getCreate');
    Route::post('language/create', 'Admin\\LanguageController@postCreate');
    Route::get('language/{id}/edit', 'Admin\\LanguageController@getEdit');
    Route::post('language/{id}/edit', 'Admin\\LanguageController@postEdit');
    Route::get('language/{id}/delete', 'Admin\\LanguageController@getDelete');
    Route::post('language/{id}/delete', 'Admin\\LanguageController@postDelete');
    Route::get('language/data', 'Admin\\LanguageController@data');
    Route::get('language/reorder', 'Admin\\LanguageController@getReorder');
    #News category
    Route::get('newscategory', 'Admin\\ArticleCategoriesController@index');
    Route::get('newscategory/create', 'Admin\\ArticleCategoriesController@getCreate');
    Route::post('newscategory/create', 'Admin\\ArticleCategoriesController@postCreate');
    Route::get('newscategory/{id}/edit', 'Admin\\ArticleCategoriesController@getEdit');
    Route::post('newscategory/{id}/edit', 'Admin\\ArticleCategoriesController@postEdit');
    Route::get('newscategory/{id}/delete', 'Admin\\ArticleCategoriesController@getDelete');
    Route::post('newscategory/{id}/delete', 'Admin\\ArticleCategoriesController@postDelete');
    Route::get('newscategory/data', 'Admin\\ArticleCategoriesController@data');
    Route::get('newscategory/reorder', 'Admin\\ArticleCategoriesController@getReorder');
    #News
    Route::get('news', 'Admin\\ArticlesController@index');
    Route::get('news/create', 'Admin\\ArticlesController@getCreate');
예제 #30
0
파일: routes.php 프로젝트: josevh/jiracal
<?php

Route::get(config('jiracal.path'), 'Josevh\\JiraCal\\JiraCalController@index');
Route::get(config('jiracal.path') . '/login', 'Josevh\\JiraCal\\JiraCalController@login');
Route::get(config('jiracal.path') . '/logout', 'Josevh\\JiraCal\\JiraCalController@logout');
Route::post(config('jiracal.path') . '/auth', 'Josevh\\JiraCal\\JiraCalController@auth');
Route::pattern('year', '[0-9]{4}');
// years are only 4 digit n$
Route::pattern('month', '[0-9]{1,2}');
// months, 1 - 2 digits
Route::pattern('day', '[0-9]{1,2}');
// days, 1 - 2 digits
Route::pattern('pkey', '[a-z,A-Z]{2,10}');
// project key
Route::pattern('ikey', '[a-z,A-Z]{2,10}-[0-9]+');
// issue key
// Route::group(['middleware' => 'jiraAuth'], function ()
// {
Route::get(config('jiracal.path') . '/{pkey}', 'Josevh\\JiraCal\\JiraCalController@pkey');
Route::get(config('jiracal.path') . '/{pkey}/{year}', 'Josevh\\JiraCal\\JiraCalController@year');
Route::get(config('jiracal.path') . '/{pkey}/{year}/{month}', 'Josevh\\JiraCal\\JiraCalController@month');
Route::get(config('jiracal.path') . '/{pkey}/{year}/{month}/{day}', 'Josevh\\JiraCal\\JiraCalController@day');
// });