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


PHP Router::delete方法代码示例

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


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

示例1: map

 /**
  * Define the routes for the application.
  *
  * @param \Illuminate\Routing\Router $router
  *
  * @return void
  */
 public function map(Router $router)
 {
     $router->group(['namespace' => $this->namespace], function (Router $router) {
         /*
          * Admin routes
          */
         $router->get('admin/attribute-groups', 'AttributeGroupsAdminController@index')->name('admin::index-attribute_groups');
         $router->get('admin/attribute-groups/create', 'AttributeGroupsAdminController@create')->name('admin::create-attribute_group');
         $router->get('admin/attribute-groups/{group}/edit', 'AttributeGroupsAdminController@edit')->name('admin::edit-attribute_group');
         $router->post('admin/attribute-groups', 'AttributeGroupsAdminController@store')->name('admin::store-attribute_group');
         $router->put('admin/attribute-groups/{group}', 'AttributeGroupsAdminController@update')->name('admin::update-attribute_group');
         $router->get('admin/attribute-groups/{group}/attributes', 'AdminController@index')->name('admin::index-attributes');
         $router->get('admin/attribute-groups/{group}/attributes/create', 'AdminController@create')->name('admin::create-attribute');
         $router->get('admin/attribute-groups/{group}/attributes/{attribute}/edit', 'AdminController@edit')->name('admin::edit-attribute');
         $router->post('admin/attribute-groups/{group}/attributes', 'AdminController@store')->name('admin::store-attribute');
         $router->put('admin/attribute-groups/{group}/attributes/{attribute}', 'AdminController@update')->name('admin::update-attribute');
         $router->post('admin/attributes/sort', 'AdminController@sort')->name('admin::sort-menulinks');
         /*
          * API routes
          */
         $router->get('api/attributes', 'ApiController@index')->name('api::index-attributes');
         $router->put('api/attributes/{attribute}', 'ApiController@update')->name('api::update-attribute');
         $router->delete('api/attributes/{attribute}', 'ApiController@destroy')->name('api::destroy-attribute');
         $router->get('api/attribute-groups', 'AttributeGroupsApiController@index')->name('api::index-attribute_groups');
         $router->put('api/attribute-groups/{attribute}', 'AttributeGroupsApiController@update')->name('api::update-attribute_group');
         $router->delete('api/attribute-groups/{attribute}', 'AttributeGroupsApiController@destroy')->name('api::destroy-attribute_group');
     });
 }
开发者ID:webfactorybulgaria,项目名称:attributes,代码行数:35,代码来源:RouteServiceProvider.php

示例2: map

 public function map(Router $router)
 {
     $router->group(['prefix' => 'dashboard', 'as' => 'dashboard.', 'middleware' => 'auth', 'namespace' => 'Dashboard'], function ($router) {
         # 后台首页
         $router->get('/', ['as' => 'console', 'uses' => 'AdminController@console']);
         #--------------------
         # 控制面板
         #--------------------
         # 个人资料
         $router->get('me', ['as' => 'me', 'uses' => 'AdminMeController@me']);
         $router->post('me', 'AdminMeController@meProfile');
         # 头像上传
         $router->post('avatar', ['as' => 'avatar', 'uses' => 'AdminMeController@avatarUpload']);
         #--------------------
         # 内容管理
         #--------------------
         # 期数
         $router->delete('issue/delete', ['as' => 'issue.delete', 'uses' => 'AdminIssueController@batchDelete']);
         $router->resource('issue', 'AdminIssueController');
         # 文章
         $router->delete('article/delete', ['as' => 'article.delete', 'uses' => 'AdminArticleController@batchDelete']);
         $router->resource('article', 'AdminArticleController');
         # 投稿
         $router->delete('submission/delete', ['as' => 'submission.delete', 'uses' => 'AdminSubmissionController@batchDelete']);
         $router->get('submission', ['as' => 'submission.index', 'uses' => 'AdminSubmissionController@index']);
         $router->get('submission/{id}/edit', ['as' => 'submission.edit', 'uses' => 'AdminSubmissionController@edit']);
         $router->put('submission/{id}', ['as' => 'submission.update', 'uses' => 'AdminSubmissionController@update']);
         $router->delete('submission/{id}', ['as' => 'submission.destroy', 'uses' => 'AdminSubmissionController@destroy']);
         # 分类
         $router->resource('category', 'AdminCategoryController');
         #--------------------
         # 用户管理
         #--------------------
         $router->group(['middleware' => 'deny403:manage_users'], function ($router) {
             # 后台员
             $router->resource('user', 'AdminUserController');
             # 订阅用户
             $router->delete('subscribe/delete', ['as' => 'subscribe.delete', 'uses' => 'AdminSubscribeController@batchDelete']);
             $router->resource('subscribe', 'AdminSubscribeController');
             # 角色
             $router->resource('role', 'AdminRoleController');
             # 权限
             $router->resource('permission', 'AdminPermissionController');
         });
         #--------------------
         # 系统管理
         #--------------------
         $router->group(['middleware' => 'deny403:manage_system'], function ($router) {
             # 系统配置
             $router->get('system_settings', ['as' => 'system.setting', 'uses' => 'AdminSystemSettingController@index']);
             $router->post('system_settings', 'AdminSystemSettingController@update');
             # 系统日志
             $router->get('system_logs', ['as' => 'system.log.index', 'uses' => 'AdminSystemLogController@index']);
             $router->get('system_logs/{id}', ['as' => 'system.log.show', 'uses' => 'AdminSystemLogController@show']);
             # 导出 excel
             $router->get('export/excel', ['as' => 'export.excel', 'uses' => 'AdminSystemLogController@excelExport']);
         });
     });
 }
开发者ID:axex,项目名称:kratos,代码行数:59,代码来源:DashboardRoutes.php

示例3: map

 /**
  * Define the routes for the application.
  *
  * @param  \Illuminate\Routing\Router  $router
  * @return void
  */
 public function map(Router $router)
 {
     $router->group(['namespace' => $this->namespace], function ($router) {
         $router->group(['before' => 'ui|csfr', 'middleware' => 'theme'], function ($router) {
             // $router->get('session/start', array('as' => 'session.start', 'uses' => 'SessionController@getStart'));
             // $router->post('session/start', array('as' => 'session.post', 'uses' => 'SessionController@postStart'));
             $router->resource('session', 'SessionController', ['only' => ['store', 'create', 'index']]);
             $router->group(array('middleware' => 'auth'), function ($router) {
                 // $router->get('session/end', array('as' => 'session.end', 'uses' => 'SessionController@getEnd'));
                 $router->get('/', array('as' => 'dash.index', 'uses' => 'DashController@getIndex'));
                 $router->get('me/time', array('as' => 'me.time.index', 'uses' => 'TimeController@index'));
                 $router->post('me/time/store', array('as' => 'me.time.store', 'uses' => 'TimeController@store'));
                 $router->get('me/time/{id}/edit', array('as' => 'me.time.edit', 'uses' => 'TimeController@edit'));
                 $router->put('me/time/{id}', array('as' => 'me.time.update', 'uses' => 'TimeController@update'));
                 $router->get('me/time/{id}/delete', array('as' => 'me.time.delete', 'uses' => 'TimeController@delete'));
                 $router->delete('me/time/{id}', array('as' => 'me.time.destroy', 'uses' => 'TimeController@destroy'));
                 $router->resource('tickets', 'TicketsController', ['except' => ['destroy']]);
                 $router->resource('actions', 'TicketActionsController', ['only' => ['store']]);
                 $router->resource('reports', 'ReportsController', ['only' => ['index', 'show']]);
                 $router->resource('dev', 'DevController', ['only' => ['index']]);
             });
         });
         $router->group(['namespace' => 'Api', 'prefix' => 'api', 'before' => 'auth|csfr'], function ($router) {
             $router->resource('users', 'UsersController', ['except' => ['create', 'store', 'edit', 'update', 'destroy']]);
             $router->resource('tickets', 'TicketsController', ['except' => ['index', 'create', 'store', 'show', 'edit', 'destroy']]);
         });
     });
 }
开发者ID:vik0803,项目名称:nuticket,代码行数:34,代码来源:RouteServiceProvider.php

示例4: routes

 private function routes(Router $router)
 {
     $router->group(['prefix' => 'api/newsletter', 'namespace' => __NAMESPACE__ . '\\Http\\Controllers', 'middleware' => 'api'], function (Router $router) {
         $router->post('members', 'NewsletterController@subscribe');
     });
     $router->group(['prefix' => 'admin', 'namespace' => __NAMESPACE__ . '\\Http\\Controllers\\Admin', 'middleware' => 'web', 'as' => 'admin.newsletters.'], function (Router $router) {
         $router->group(['prefix' => 'newsletters'], function (Router $router) {
             $router->get('/', 'Newsletters@index')->name('index');
             $router->get('/create', 'Newsletters@create')->name('create');
             $router->get('/{newsletter}', 'Newsletters@show')->name('show');
             $router->get('/{newsletter}/body', 'Newsletters@body')->name('show.body');
             $router->post('/', 'Newsletters@store')->name('store');
             $router->post('/preview', 'Newsletters@preview')->name('preview');
             $router->post('/send', 'Newsletters@storeAndSend')->name('store_and_send');
             $router->post('/{newsletter}', 'Newsletters@update')->name('update');
             $router->post('/{newsletter}/send', 'Newsletters@updateAndSend')->name('update_and_send');
             $router->delete('/{newsletter}', 'Newsletters@destroy')->name('destroy');
         });
         $router->group(['prefix' => 'newsletter-lists', 'as' => 'lists.'], function (Router $router) {
             $router->get('/', 'Lists@index')->name('index');
             $router->get('/create', 'Lists@create')->name('create');
             $router->post('/', 'Lists@store')->name('store');
             $router->put('/default', 'Lists@setDefault')->name('default');
             $router->get('/{list}', 'Lists@show')->name('show');
             $router->get('/{list}/edit', 'Lists@edit')->name('edit');
             $router->put('/{list}', 'Lists@update')->name('update');
             $router->delete('/{list}', 'Lists@destroy')->name('destroy');
             $router->get('/{list}/members', 'Members@index');
             $router->post('/{list}/members', 'Members@store')->name('members.store');
             $router->delete('/{list}/members/{member}', 'Members@destroy')->name('members.destroy');
             $router->post('/parse', 'Parser@parse');
         });
     });
 }
开发者ID:jeroennoten,项目名称:laravel-newsletter,代码行数:34,代码来源:ServiceProvider.php

示例5: registerDelete

 private function registerDelete($modelName, $controller)
 {
     $url = sprintf('%s/{id}', $this->toUrlName($modelName));
     $routeName = $this->getDeleteName($modelName);
     $action = $controller . '@delete';
     $this->router->delete($url, ['as' => $routeName, 'uses' => $action]);
 }
开发者ID:hramose,项目名称:Auja-Laravel,代码行数:7,代码来源:AujaRouter.php

示例6: map

 public function map(Router $router)
 {
     // Index of Panel
     $router->get('/', ['as' => 'index', 'middleware' => 'auth', 'uses' => 'Base\\IndexController@getIndex']);
     // Handle Index. Redirect /index to /
     $router->get('/index', function () {
         return redirect()->route('index');
     });
     // Password Generation
     $router->get('/password-gen/{length}', ['as' => 'password-gen', 'middleware' => 'auth', 'uses' => 'Base\\IndexController@getPassword']);
     // Account Routes
     $router->group(['profix' => 'account', 'middleware' => ['auth', 'csrf']], function () use($router) {
         $router->get('account', ['as' => 'account', 'uses' => 'Base\\IndexController@getAccount']);
         $router->post('/account/password', ['uses' => 'Base\\IndexController@postAccountPassword']);
         $router->post('/account/email', ['uses' => 'Base\\IndexController@postAccountEmail']);
     });
     // TOTP Routes
     $router->group(['prefix' => 'account/security', 'middleware' => ['auth', 'csrf']], function () use($router) {
         $router->get('/', ['as' => 'account.security', 'uses' => 'Base\\IndexController@getAccountSecurity']);
         $router->get('/revoke/{id}', ['as' => 'account.security.revoke', 'uses' => 'Base\\IndexController@getRevokeSession']);
         $router->put('/', ['uses' => 'Base\\IndexController@putAccountTotp']);
         $router->post('/', ['uses' => 'Base\\IndexController@postAccountTotp']);
         $router->delete('/', ['uses' => 'Base\\IndexController@deleteAccountTotp']);
     });
 }
开发者ID:Pterodactyl,项目名称:Panel,代码行数:25,代码来源:BaseRoutes.php

示例7: map

 /**
  * Define the routes for the application.
  *
  * @param \Illuminate\Routing\Router $router
  *
  * @return void
  */
 public function map(Router $router)
 {
     $router->group(['namespace' => $this->namespace], function (Router $router) {
         /*
          * Front office routes
          */
         if ($page = TypiCMS::getPageLinkedToModule('news')) {
             $options = $page->private ? ['middleware' => 'auth'] : [];
             foreach (config('translatable.locales') as $lang) {
                 if ($uri = $page->uri($lang)) {
                     $router->get($uri, $options + ['as' => $lang . '.news', 'uses' => 'PublicController@index']);
                     $router->get($uri . '/{slug}', $options + ['as' => $lang . '.news.slug', 'uses' => 'PublicController@show']);
                 }
             }
         }
         /*
          * Admin routes
          */
         $router->get('admin/news', ['as' => 'admin.news.index', 'uses' => 'AdminController@index']);
         $router->get('admin/news/create', ['as' => 'admin.news.create', 'uses' => 'AdminController@create']);
         $router->get('admin/news/{news}/edit', ['as' => 'admin.news.edit', 'uses' => 'AdminController@edit']);
         $router->post('admin/news', ['as' => 'admin.news.store', 'uses' => 'AdminController@store']);
         $router->put('admin/news/{news}', ['as' => 'admin.news.update', 'uses' => 'AdminController@update']);
         /*
          * API routes
          */
         $router->get('api/news', ['as' => 'api.news.index', 'uses' => 'ApiController@index']);
         $router->put('api/news/{news}', ['as' => 'api.news.update', 'uses' => 'ApiController@update']);
         $router->delete('api/news/{news}', ['as' => 'api.news.destroy', 'uses' => 'ApiController@destroy']);
     });
 }
开发者ID:thierry88,项目名称:News,代码行数:38,代码来源:RouteServiceProvider.php

示例8: map

 /**
  * Define the routes for the application.
  *
  * @param \Illuminate\Routing\Router $router
  *
  * @return void
  */
 public function map(Router $router)
 {
     $router->group(['namespace' => $this->namespace], function (Router $router) {
         /*
          * Front office routes
          */
         if ($page = TypiCMS::getPageLinkedToModule('galleries')) {
             $options = $page->private ? ['middleware' => 'auth'] : [];
             foreach (config('translatable.locales') as $lang) {
                 if ($page->translate($lang)->status && ($uri = $page->uri($lang))) {
                     $router->get($uri, $options + ['as' => $lang . '.galleries', 'uses' => 'PublicController@index']);
                     $router->get($uri . '/{slug}', $options + ['as' => $lang . '.galleries.slug', 'uses' => 'PublicController@show']);
                 }
             }
         }
         /*
          * Admin routes
          */
         $router->get('admin/galleries', 'AdminController@index')->name('admin::index-galleries');
         $router->get('admin/galleries/create', 'AdminController@create')->name('admin::create-gallery');
         $router->get('admin/galleries/{gallery}/edit', 'AdminController@edit')->name('admin::edit-gallery');
         $router->post('admin/galleries', 'AdminController@store')->name('admin::store-gallery');
         $router->put('admin/galleries/{gallery}', 'AdminController@update')->name('admin::update-gallery');
         /*
          * API routes
          */
         $router->get('api/galleries', 'ApiController@index')->name('api::index-galleries');
         $router->put('api/galleries/{gallery}', 'ApiController@update')->name('api::update-gallery');
         $router->delete('api/galleries/{gallery}', 'ApiController@destroy')->name('api::destroy-gallery');
     });
 }
开发者ID:webfactorybulgaria,项目名称:Galleries,代码行数:38,代码来源:RouteServiceProvider.php

示例9: setup

 public function setup(Router $router)
 {
     // Need to be loaded first.
     $this->route('cms', function ($router) {
         $router->get('/', 'IndexController@index');
         $router->get('logout', 'Auth\\AuthController@logout');
         $router->get('login', 'Auth\\AuthController@index');
         $router->post('login', 'Auth\\AuthController@authenticate');
     });
     // API route to show that it's there.
     $this->route('api', function ($router) {
         $router->get('/', 'REST\\ModelController@index');
         $router->get('/{model}', 'REST\\ModelController@fetchAll')->middleware(['model']);
         $router->get('/{model}/{id}', 'REST\\ModelController@fetch')->middleware(['model']);
         $router->post('/{model}', 'REST\\ModelController@create')->middleware(['auth', 'model']);
         $router->put('/{model}/{id}', 'REST\\ModelController@update')->middleware(['auth', 'model']);
         $router->delete('/{model}/{id}', 'REST\\ModelController@destroy')->middleware(['auth', 'model']);
     });
     // Media uploading routes and controller.
     $this->route('cms', function ($router) {
         $router->post(Media::getLabel('slug') . '/upload', ['as' => 'mediaUpload', 'uses' => 'MediaController@upload']);
         $router->get(Media::getLabel('slug') . '/list', ['as' => 'mediaList', 'uses' => 'MediaController@select']);
     });
     $this->basicSetup();
 }
开发者ID:breachofmind,项目名称:birdmin,代码行数:25,代码来源:System.php

示例10: map

 /**
  * Define the routes for the application.
  *
  * @param \Illuminate\Routing\Router $router
  *
  * @return void
  */
 public function map(Router $router)
 {
     $router->group(['namespace' => $this->namespace], function (Router $router) {
         /*
          * Front office routes
          */
         if ($page = TypiCMS::getPageLinkedToModule('newsletter')) {
             $options = $page->private ? ['middleware' => 'auth'] : [];
             foreach (config('translatable.locales') as $lang) {
                 if ($uri = $page->uri($lang)) {
                     $router->get($uri, $options + ['as' => $lang . '.newsletter', 'uses' => 'PublicController@form']);
                     $router->get($uri . '/sent', $options + ['as' => $lang . '.newsletter.sent', 'uses' => 'PublicController@sent']);
                     $router->post($uri, $options + ['as' => $lang . '.newsletter.store', 'uses' => 'PublicController@store']);
                 }
             }
         }
         /*
          * Admin routes
          */
         $router->get('admin/newsletter', 'AdminController@index')->name('admin::index-newsletter');
         $router->get('admin/newsletter/create', 'AdminController@create')->name('admin::create-newsletter');
         $router->get('admin/newsletter/export', 'AdminController@export')->name('admin::export-newsletter');
         $router->get('admin/newsletter/{newsletter}/edit', 'AdminController@edit')->name('admin::edit-newsletter');
         $router->post('admin/newsletter', 'AdminController@store')->name('admin::store-newsletter');
         $router->put('admin/newsletter/{newsletter}', 'AdminController@update')->name('admin::update-newsletter');
         /*
          * API routes
          */
         $router->get('api/newsletter', 'ApiController@index')->name('api::index-newsletter');
         $router->put('api/newsletter/{newsletter}', 'ApiController@update')->name('api::update-newsletter');
         $router->delete('api/newsletter/{newsletter}', 'ApiController@destroy')->name('api::destroy-newsletter');
     });
 }
开发者ID:webfactorybulgaria,项目名称:newsletter,代码行数:40,代码来源:RouteServiceProvider.php

示例11: map

 /**
  * Define the routes for the application.
  *
  * @param \Illuminate\Routing\Router $router
  *
  * @return void
  */
 public function map(Router $router)
 {
     $router->group(['namespace' => $this->namespace], function (Router $router) {
         /*
          * Public routes
          */
         $router->get('comments', 'PublicController@index')->name('public::index-comments');
         $router->post('comments', 'PublicController@store')->name('public::store-comment');
         /*
          * Admin routes
          */
         $router->get('admin/comments', 'AdminController@index')->name('admin::index-comments');
         $router->get('admin/comments/create', 'AdminController@create')->name('admin::create-comment');
         $router->get('admin/comments/{comment}/edit', 'AdminController@edit')->name('admin::edit-comment');
         $router->post('admin/comments', 'AdminController@store')->name('admin::store-comment');
         $router->put('admin/comments/{comment}', 'AdminController@update')->name('admin::update-comment');
         $router->post('admin/comments/sort', 'AdminController@sort')->name('admin::sort-comments');
         /*
          * API routes
          */
         $router->get('api/comments', 'ApiController@index')->name('api::index-comments');
         $router->put('api/comments/{comment}', 'ApiController@update')->name('api::update-comment');
         $router->delete('api/comments/{comment}', 'ApiController@destroy')->name('api::destroy-comment');
     });
 }
开发者ID:webfactorybulgaria,项目名称:comments,代码行数:32,代码来源:RouteServiceProvider.php

示例12: defineRoutes

 private function defineRoutes()
 {
     $this->router->get("hook", ["uses" => "Menus\\MenuController@showMeTheAreas"]);
     $this->router->group(['prefix' => "dashboard/menu", 'namespace' => "Menus"], function () {
         $this->router->get('/place', ['as' => 'menu.place', 'uses' => 'MenuController@getPlace']);
         $this->router->get('/create', ['as' => 'menu.create', 'uses' => 'MenuController@getCreate']);
         $this->router->post('/create', ['as' => 'menu.create.post', 'uses' => 'MenuController@postCreate']);
         $this->router->get('/{_id}', ['as' => 'menu.update', 'uses' => 'MenuController@getUpdate']);
         $this->router->put('/update/{_id}', ['as' => 'menu.update.put', 'uses' => 'MenuController@putUpdate']);
         $this->router->get('/', ['as' => 'menu.list', 'uses' => 'MenuController@getList']);
         $this->router->post('/update/{_id}/order', ['as' => 'menu.update.order.put', 'uses' => 'MenuController@postMenuOrder']);
         $this->router->put('/update/{_id}/item', ['as' => 'menu.update.item.put', 'uses' => 'MenuController@putMenuItem']);
         $this->router->post('/update/{_id}/add-item', ['as' => 'menu.update.add-item.post', 'uses' => 'MenuController@postAddItem']);
         $this->router->delete('/delete/{_id}/item', ['as' => 'menu.delete.item.delete', 'uses' => 'MenuController@deleteItem']);
     });
 }
开发者ID:PhonemeCms,项目名称:cms,代码行数:16,代码来源:MenusServiceProvider.php

示例13: adminRoutes

 private function adminRoutes(Router $router)
 {
     $router->get('/', 'NewsAdminController@index')->name('index');
     $router->get('/create', 'NewsAdminController@create')->name('create');
     $router->post('/', 'NewsAdminController@store')->name('store');
     $router->get('/{article}', 'NewsAdminController@edit')->name('edit');
     $router->put('/{article}', 'NewsAdminController@update')->name('update');
     $router->delete('/{article}', 'NewsAdminController@destroy')->name('destroy');
 }
开发者ID:jeroennoten,项目名称:laravel-news,代码行数:9,代码来源:Routing.php

示例14: map

 public function map(Router $router)
 {
     $router->group(['prefix' => 'server/{server}', 'middleware' => ['auth', 'server', 'csrf']], function ($server) use($router) {
         // Index View for Server
         $router->get('/', ['as' => 'server.index', 'uses' => 'Server\\ServerController@getIndex']);
         // Settings
         $router->get('/settings', ['as' => 'server.settings', 'uses' => 'Server\\ServerController@getSettings']);
         $router->post('/settings/sftp', ['as' => 'server.settings.sftp', 'uses' => 'Server\\ServerController@postSettingsSFTP']);
         $router->post('/settings/startup', ['as' => 'server.settings.startup', 'uses' => 'Server\\ServerController@postSettingsStartup']);
         // File Manager Routes
         $router->get('/files', ['as' => 'server.files.index', 'uses' => 'Server\\ServerController@getFiles']);
         $router->get('/files/edit/{file}', ['as' => 'server.files.edit', 'uses' => 'Server\\ServerController@getEditFile'])->where('file', '.*');
         $router->get('/files/download/{file}', ['as' => 'server.files.download', 'uses' => 'Server\\ServerController@getDownloadFile'])->where('file', '.*');
         $router->get('/files/add', ['as' => 'server.files.add', 'uses' => 'Server\\ServerController@getAddFile']);
         $router->post('files/directory-list', ['as' => 'server.files.directory-list', 'uses' => 'Server\\AjaxController@postDirectoryList']);
         $router->post('files/save', ['as' => 'server.files.save', 'uses' => 'Server\\AjaxController@postSaveFile']);
         // Sub-User Routes
         $router->get('users', ['as' => 'server.subusers', 'uses' => 'Server\\SubuserController@getIndex']);
         $router->get('users/new', ['as' => 'server.subusers.new', 'uses' => 'Server\\SubuserController@getNew']);
         $router->post('users/new', ['uses' => 'Server\\SubuserController@postNew']);
         $router->get('users/view/{id}', ['as' => 'server.subusers.view', 'uses' => 'Server\\SubuserController@getView']);
         $router->post('users/view/{id}', ['uses' => 'Server\\SubuserController@postView']);
         $router->delete('users/delete/{id}', ['uses' => 'Server\\SubuserController@deleteSubuser']);
         $router->get('tasks/', ['as' => 'server.tasks', 'uses' => 'Server\\TaskController@getIndex']);
         $router->get('tasks/view/{id}', ['as' => 'server.tasks.view', 'uses' => 'Server\\TaskController@getView']);
         $router->get('tasks/new', ['as' => 'server.tasks.new', 'uses' => 'Server\\TaskController@getNew']);
         $router->post('tasks/new', ['uses' => 'Server\\TaskController@postNew']);
         $router->delete('tasks/delete/{id}', ['as' => 'server.tasks.delete', 'uses' => 'Server\\TaskController@deleteTask']);
         $router->post('tasks/toggle/{id}', ['as' => 'server.tasks.toggle', 'uses' => 'Server\\TaskController@toggleTask']);
         // Assorted AJAX Routes
         $router->group(['prefix' => 'ajax'], function ($server) use($router) {
             // Returns Server Status
             $router->get('status', ['uses' => 'Server\\AjaxController@getStatus']);
             // Sets the Default Connection for the Server
             $router->post('set-connection', ['uses' => 'Server\\AjaxController@postSetConnection']);
             $router->post('settings/reset-database-password', ['as' => 'server.ajax.reset-database-password', 'uses' => 'Server\\AjaxController@postResetDatabasePassword']);
         });
         // Assorted AJAX Routes
         $router->group(['prefix' => 'js'], function ($server) use($router) {
             // Returns Server Status
             $router->get('{file}', ['as' => 'server.js', 'uses' => 'Server\\ServerController@getJavascript'])->where('file', '.*');
         });
     });
 }
开发者ID:Pterodactyl,项目名称:Panel,代码行数:44,代码来源:ServerRoutes.php

示例15: map

 /**
  * Define the routes for the application.
  *
  * @param \Illuminate\Routing\Router $router
  *
  * @return void
  */
 public function map(Router $router)
 {
     $router->group(['namespace' => $this->namespace], function (Router $router) {
         /*
          * API routes
          */
         $router->get('api/history', 'ApiController@index')->name('api::index-history');
         $router->delete('api/history', 'ApiController@destroy')->name('api::destroy-history');
     });
 }
开发者ID:typicms,项目名称:history,代码行数:17,代码来源:RouteServiceProvider.php


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