当前位置: 首页>>代码示例>>PHP>>正文


PHP Route::any方法代码示例

本文整理汇总了PHP中Illuminate\Support\Facades\Route::any方法的典型用法代码示例。如果您正苦于以下问题:PHP Route::any方法的具体用法?PHP Route::any怎么用?PHP Route::any使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Illuminate\Support\Facades\Route的用法示例。


在下文中一共展示了Route::any方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: routes

 private function routes(Router $router)
 {
     $router->middleware('djem.auth', \DJEM\Http\Middleware\Authenticate::class);
     $router->middlewareGroup('djem.web', [\Illuminate\Cookie\Middleware\EncryptCookies::class, \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, \Illuminate\Session\Middleware\StartSession::class, \Illuminate\View\Middleware\ShareErrorsFromSession::class, \DJEM\Http\Middleware\VerifyCsrfToken::class]);
     Route::group(['middleware' => ['djem.web', 'djem.auth'], 'namespace' => '\\DJEM\\Http\\Controllers'], function () {
         Route::any('djem/api', 'Api@getState');
         Route::any('djem/api/tree', 'Api\\Main@tree');
         Route::any('djem/api/grid', 'Api\\Main@grid');
         Route::any('djem/api/content/delete', 'Api\\Content@delete');
         Route::any('djem/api/content/load', 'Api\\Content@loadRelation');
         Route::get('djem/api/content', 'Api\\Content@get');
         Route::post('djem/api/content', 'Api\\Content@set');
         Route::get('djem/api/files', 'Api\\Files@get');
         Route::post('djem/api/files/upload', 'Api\\Files@upload');
         Route::post('djem/api/files', 'Api\\Files@set');
     });
     Route::get('djem/{file?}', '\\DJEM\\Http\\Controllers\\StaticFiles@get')->where('file', '.*');
 }
开发者ID:deadem,项目名称:djem,代码行数:18,代码来源:DJEMServiceProvider.php

示例2: function

|
*/
Route::group(['middleware' => ['throttle:60,1']], function () {
    Route::post('/prod/scroll', 'FrontController@scrollProd');
});
Route::group(['middleware' => ['web']], function () {
    Route::get('/', ['as' => 'home', 'uses' => 'FrontController@index']);
    Route::get('/prod/{id}/{slug?}', 'FrontController@showProduct');
    Route::get('mentions', 'FrontController@mentions');
    Route::get('/cat/{id}/{slug?}', 'FrontController@showProductByCategory');
    Route::get('/tag/{id}/{tag?}', 'FrontController@showProductByTags');
    Route::get('contact', 'FrontController@showContact');
    Route::post('storeContact', 'FrontController@storeContact');
    Route::post('/prod', 'FrontController@orderProduct');
    Route::post('/prod/modif', 'FrontController@orderModif');
    Route::any('login', 'LoginController@login');
    Route::get('logout', 'LoginController@logout');
    Route::group(['middleware' => ['auth']], function () {
        Route::get('moncompte', 'FrontController@monCompte');
        Route::get('moncompte/detailOrder/{id}', 'FrontController@detailOrder');
        Route::get('panier', 'FrontController@showPanier');
        Route::get('panier/validate', 'FrontController@validatePanier');
        Route::get('panier/confirmate', 'FrontController@confirmatePanier');
    });
    Route::group(['middleware' => ['auth', 'admin']], function () {
        Route::resource('product', 'ProductController');
        Route::get('product/{id}/status', 'ProductController@status');
        Route::get('history', 'ProductController@history');
        Route::resource('category', 'CategoryController');
    });
});
开发者ID:olivierfinot,项目名称:ProjetLaravel,代码行数:31,代码来源:routes.php

示例3: function

Route::get('/', ['as' => '/nl', "uses" => "HomeController@start"]);
Route::group(["prefix" => "{locale}", "middleware" => ["lang"]], function () {
    Route::get("about-me", ['as' => "about-me", "uses" => "HomeController@aboutMe"]);
    Route::get("contact", ['as' => "contact", "uses" => "HomeController@contact"]);
    Route::get("portfolio", ["as" => "portfolio", "uses" => "PortfolioController@index"]);
    Route::group(["prefix" => "auth"], function () {
        Route::get("login", ['uses' => 'Auth\\AuthController@login', 'as' => 'auth/login']);
        Route::post("authenticate", ['uses' => 'Auth\\AuthController@authenticate', 'as' => 'auth/authenticate']);
        Route::get("reset", ['uses' => 'Auth\\AuthController@reset', 'as' => 'auth/reset']);
        Route::post("register", ['uses' => 'Auth\\AuthController@register', 'as' => 'auth/register']);
        Route::get("logout", ['uses' => 'Auth\\AuthController@logout', 'as' => 'auth/logout']);
        Route::get("facebook", ['uses' => 'Auth\\AuthController@facebook', 'as' => 'auth/facebook']);
    });
});
Route::group(['prefix' => 'admin', 'middleware' => ['auth', "role:Admin"], 'namespace' => 'Admin'], function () {
    Route::get("/home", ['uses' => 'HomeController@home', 'as' => 'admin/home']);
    Route::resource("education", "EducationController");
    Route::resource("users", "UsersController");
    Route::resource("settings", "SettingsController");
    Route::group(["prefix" => "mail"], function () {
        Route::get("{mailbox?}", "MailController@index");
        Route::get("{mailbox}/{mail}", "MailController@mail");
    });
    Route::group(["prefix" => "portfolio"], function () {
        Route::resource("projects", "ProjectsController");
        Route::resource("projects/{project_id}/tasks", "TaskController");
        Route::any("projects/{project_id}/tasks/{task_id}/sendToGithub", ["uses" => "TaskController@sendToGitHub", "as" => "admin.portfolio.projects.{project_id}.tasks.sendToGithub"]);
        Route::resource("internship", "InternshipController");
        Route::resource("Tests", "TestsController");
    });
});
开发者ID:aranna00,项目名称:arankieskamp.me,代码行数:31,代码来源:routes.php

示例4: function

    Route::get('/', ['as' => 'home', 'uses' => 'FrontController@index']);
    Route::get('cat/{id}/{slug?}', 'FrontController@showProductByCategory');
    Route::get('tag/{id}/{slug?}', 'FrontController@showProductByTag');
    Route::get('prod/{id}/{slug?}', 'FrontController@showProduct');
    Route::post('storeCart', 'FrontController@storeCart');
    Route::get('cart', 'FrontController@showCart');
    Route::get('removeCart/{id}', 'FrontController@removeCart');
    Route::post('quantityCart', 'FrontController@quantityCart');
    Route::post('updateQuantity', 'FrontController@updateQuantity');
    Route::get('contact', 'FrontController@showContact');
    Route::post('storeContact', 'FrontController@storeContact');
    Route::get('account', 'FrontController@account');
    Route::get('register', 'RegisterController@register');
    Route::post('storeUser', 'RegisterController@storeUser');
    Route::group(['middleware' => ['throttle:60,1']], function () {
        Route::any('login', 'LoginController@login');
    });
    Route::get('logout', 'LoginController@logout');
    Route::group(['middleware' => ['auth', 'admin']], function () {
        Route::resource('product', 'Admin\\ProductController');
        Route::get('product/status/{id}', 'Admin\\ProductController@changeStatus');
        Route::get('product/remove/{id}', 'Admin\\ProductController@confirmRemove');
        Route::get('history', 'Admin\\HistoryController@index');
    });
    Route::group(['middleware' => ['auth']], function () {
        Route::get('validateCart', 'FrontController@validateCart');
        Route::get('confirmCart', 'FrontController@confirmCart');
        Route::any('customer', 'RegisterController@customer');
        Route::post('storeCustomer', 'RegisterController@storeCustomer');
    });
});
开发者ID:yinilauriot,项目名称:StarWars,代码行数:31,代码来源:routes.php

示例5: function

<?php

use Illuminate\Support\Facades\Route;
/**
 * Authentication
 */
Route::group(['prefix' => 'v1', 'middleware' => 'cors'], function () {
    Route::any('/auth/fellowshipone', ['as' => 'authEndpoint', 'uses' => 'AuthController@fellowshipone']);
    Route::post('auth/register', 'AuthController@register');
    Route::get('auth/verify-email', 'AuthController@verifyEmail');
});
/**
 * API
 */
Route::group(['prefix' => 'v1', 'middleware' => 'jwt.auth'], function () {
    Route::get('/', 'AuthenticateController@index');
});
开发者ID:mcculley1108,项目名称:api.faithpromise.org,代码行数:17,代码来源:routes.php

示例6: function

                Route::post('tags', 'Tags@add');
                Route::delete('tags/{tag}', 'Tags@remove');
                Route::get('relations', 'Relations@index');
                Route::post('relations/{related}', 'Relations@store');
                Route::delete('relations/{related}', 'Relations@destroy');
                Route::get('acl', 'Acl@index');
                Route::put('acl', 'Acl@update');
                Route::post('acl/{group}', 'Acl@store');
                Route::delete('acl/{group}', 'Acl@destroy');
                Route::get('', 'PageController@getIndex');
            });
        });
    });
});
Route::group(['prefix' => 'asset'], function () {
    Route::get('version/{id}/{width?}/{height?}', ['as' => 'asset-version', 'middleware' => ['web', Middleware\RequireLogin::class], 'uses' => function ($versionId, $width = null, $height = null) {
        $asset = Asset::findByVersionId($versionId);
        return App::make(AssetHelper::controller($asset), [$asset])->view($width, $height);
    }]);
    Route::get('{asset}/download', ['asset' => 'asset-download', 'middleware' => [Middleware\LogAssetDownload::class], 'uses' => function ($asset) {
        return App::make(AssetHelper::controller($asset), [$asset])->download();
    }]);
    Route::get('{asset}/{action}.{extension}', ['as' => 'asset', 'middleware' => [Middleware\CheckAssetETag::class], 'uses' => function ($asset, $action = 'view', $width = null, $height = null) {
        return App::make(AssetHelper::controller($asset), [$asset])->{$action}($width, $height);
    }])->where(['action' => '[a-z]+', 'extension' => '[a-z]+']);
    Route::get('{asset}/{action?}/{width?}/{height?}', ['as' => 'asset', 'middleware' => [Middleware\CheckAssetETag::class], 'uses' => function ($asset, $action = 'view', $width = null, $height = null) {
        return App::make(AssetHelper::controller($asset), [$asset])->{$action}($width, $height);
    }]);
});
Route::any('{location}.{format?}', ['middleware' => ['web', Middleware\RoutePage::class, Middleware\CheckPageAcl::class, Middleware\InsertCMSToolbar::class], 'uses' => 'BoomCMS\\Http\\Controllers\\PageController@show'])->where(['location' => '(.*?)', 'format' => '([a-z]+)']);
开发者ID:boomcms,项目名称:boom-core,代码行数:30,代码来源:routes.php

示例7: config

<?php

use Illuminate\Support\Facades\Route;
Route::group(['domain' => config('site.students_domain')], function () {
    Route::get('/', 'Students\\MainController@index');
    Route::get('/leaders', 'Students\\MainController@index');
    Route::get('/parents', 'Students\\MainController@index');
    Route::get('/students', 'Students\\MainController@index');
    Route::get('/sermons', 'Students\\MainController@index');
    Route::any('{all}', 'Students\\MainController@index');
});
开发者ID:mcculley1108,项目名称:faithpromise.org,代码行数:11,代码来源:routes_fpstudents_website.php

示例8: function

    });
    Route::group(['prefix' => 'user'], function () {
        Route::any('like', 'UserLikeController@create');
        Route::post('/save', 'Admin\\AdminAjaxController@save');
    });
});
//test domain
Route::group(['prefix' => '/test/', 'namespace' => 'Test'], function () {
    Route::get('article', "GlobalTestController@article");
    Route::get('paginate', 'GlobalTestController@paginate');
    Route::get('testpage', 'GlobalTestController@testpage');
});
//API domain
Route::group(['prefix' => 'api', 'namespace' => 'API'], function () {
    ///api/sign domain
    Route::group(['prefix' => 'sign'], function () {
        Route::any('in', 'SignController@in');
        Route::any('up', 'SignController@up');
    });
    //api/user domain
    Route::group(['prefix' => 'user'], function () {
        Route::any('show', 'UserController@show');
        Route::group(['prefix' => 'like'], function () {
            Route::any('show/{id}', 'UserLikeController@show');
        });
    });
    //api/portal domain
    Route::group(['prefix' => 'userlike'], function () {
        Route::any('show/{id}', 'PortalController@show');
    });
});
开发者ID:kits2code,项目名称:ignore,代码行数:31,代码来源:routes.php

示例9: array

/*
|--------------------------------------------------------------------------
| 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::get('/', 'HomeController@listPosts');
Route::get('show/{id}', 'HomeController@showPost')->where(array('id' => '[0-9]+'));
Route::get('users', array('before' => 'auth', 'uses' => 'UsersController@index'));
Route::get('login', 'HomeController@loginShow');
Route::post('login', 'HomeController@loginDo');
Route::post('add-comment/{postId}', array('as' => 'add-comment', 'before' => 'csrf', 'uses' => 'HomeController@addComment'))->where(array('postId' => '[0-9]+'));
Route::group(array('before' => 'auth'), function () {
    Route::any('admin', function () {
        return Redirect::to('admin/posts');
    });
    Route::any('logout', function () {
        Auth::logout();
        return Redirect::to('/');
    });
    Route::get('admin/posts', array('uses' => 'PostAdminController@index'));
    Route::get('admin/posts/create', array('uses' => 'PostAdminController@createShow'));
    Route::post('admin/posts/create', array('uses' => 'PostAdminController@createDo'));
    Route::get('admin/posts/edit/{id}', array('uses' => 'PostAdminController@editShow'))->where(array('id' => '[0-9]+'));
    Route::post('admin/posts/edit/{id}', array('uses' => 'PostAdminController@editDo'))->where(array('id' => '[0-9]+'));
    Route::get('admin/posts/delete/{id}', array('uses' => 'PostAdminController@delete'))->where(array('id' => '[0-9]+'));
});
开发者ID:mudonat,项目名称:laravel-test,代码行数:31,代码来源:routes.php

示例10: function

            });
            Route::post('page/relations/add/{page}', 'Page\\Relations@add');
            Route::post('page/relations/remove/{page}', 'Page\\Relations@remove');
            Route::get('page/relations/view/{page}', 'Page\\Relations@view');
            Route::group(['prefix' => 'page/settings'], function () {
                Route::get('{action}/{page}', ['uses' => function ($action) {
                    return App::make('BoomCMS\\Http\\Controllers\\CMS\\Page\\Settings\\View')->{$action}();
                }]);
                Route::post('{action}/{page}', ['uses' => function ($action, $page) {
                    return App::make('BoomCMS\\Http\\Controllers\\CMS\\Page\\Settings\\Save')->{$action}($page);
                }]);
            });
        });
    });
    Route::get('page/children', 'BoomCMS\\Http\\Controllers\\PageController@children');
    Route::get('asset/version/{id}/{width?}/{height?}', ['as' => 'asset-version', 'middleware' => [Middleware\RequireLogin::class], 'uses' => function (Auth $auth, $id, $width = null, $height = null) {
        $asset = Asset::findByVersionId($id);
        return App::make(AssetHelper::controller($asset), [$auth, $asset])->view($width, $height);
    }]);
    Route::get('asset/{asset}/download', ['asset' => 'asset-download', 'middleware' => [Middleware\LogAssetDownload::class], 'uses' => function (Auth $auth, $asset) {
        return App::make(AssetHelper::controller($asset), [$auth, $asset])->download();
    }]);
    Route::get('asset/{asset}/{action}.{extension}', ['as' => 'asset', 'middleware' => [Middleware\CheckAssetETag::class], 'uses' => function (Auth $auth, $asset, $action = 'view', $width = null, $height = null) {
        return App::make(AssetHelper::controller($asset), [$auth, $asset])->{$action}($width, $height);
    }])->where(['action' => '[a-z]+', 'extension' => '[a-z]+']);
    Route::get('asset/{asset}/{action?}/{width?}/{height?}', ['as' => 'asset', 'middleware' => [Middleware\CheckAssetETag::class], 'uses' => function (Auth $auth, $asset, $action = 'view', $width = null, $height = null) {
        return App::make(AssetHelper::controller($asset), [$auth, $asset])->{$action}($width, $height);
    }]);
});
Route::any('{location}.{format?}', ['middleware' => [Middleware\ProcessSiteURL::class, Middleware\InsertCMSToolbar::class, Middleware\SaveUrlForRedirect::class], 'uses' => 'BoomCMS\\Http\\Controllers\\PageController@show'])->where(['location' => '(.*?)', 'format' => '([a-z]+)']);
开发者ID:robbytaylor,项目名称:boom-core,代码行数:30,代码来源:routes.php


注:本文中的Illuminate\Support\Facades\Route::any方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。