You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

218 lines
11 KiB

8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
  1. <?php
  2. /*
  3. |--------------------------------------------------------------------------
  4. | Web Routes
  5. |--------------------------------------------------------------------------
  6. |
  7. | Here is where you can register web routes for your application. These
  8. | routes are loaded by the RouteServiceProvider within a group which
  9. | contains the "web" middleware group. Now create something great!
  10. |
  11. */
  12. //wap路由,要放到最前面,否则解析不到
  13. Route::group(['domain' => env('APP_SUBDOMAIN'), 'namespace' => 'Wap'], function () {
  14. Route::get('/', 'IndexController@index')->name('wap_home');
  15. Route::get('/tags', 'IndexController@tags');
  16. Route::get('/search', 'IndexController@search');
  17. Route::get('/cat{cat}/id{id}', 'IndexController@detail'); //详情页
  18. Route::get('/cat{cat}/{page}', 'IndexController@category'); //分类页,分页
  19. Route::get('/cat{cat}', 'IndexController@category'); //分类页
  20. Route::get('/tag{tag}/{page}', 'IndexController@tag'); //标签页,分页
  21. Route::get('/tag{tag}', 'IndexController@tag'); //标签页
  22. Route::get('/page/{id}', 'IndexController@singlepage')->name('wap_singlepage'); //单页
  23. Route::get('/aaa', function () {
  24. dd('wap');
  25. });
  26. });
  27. //前台路由
  28. Route::group(['namespace' => 'Home'], function () {
  29. Route::get('/', 'IndexController@index')->name('home');
  30. Route::get('/page404', 'IndexController@page404')->name('page404'); //404页面
  31. Route::get('/tags', 'IndexController@tags')->name('tags');
  32. Route::get('/search', 'IndexController@search');
  33. Route::get('/cat{cat}/id{id}', 'IndexController@detail'); //详情页
  34. Route::get('/cat{cat}/{page}', 'IndexController@category'); //分类页,分页
  35. Route::get('/cat{cat}', 'IndexController@category'); //分类页
  36. Route::get('/tag{tag}/{page}', 'IndexController@tag'); //标签页,分页
  37. Route::get('/tag{tag}', 'IndexController@tag'); //标签页
  38. Route::get('/page/{id}', 'IndexController@page')->name('page'); //单页
  39. Route::get('/aaa', function () {
  40. dd('wap');
  41. });
  42. });
  43. //后台路由
  44. Route::group(['prefix' => 'fladmin', 'namespace' => 'Admin', 'middleware' => ['web']], function () {
  45. Route::get('/', 'IndexController@index')->name('admin');
  46. Route::get('/index/upconfig', 'IndexController@upconfig')->name('admin_index_upconfig');
  47. //文章
  48. Route::get('/article', 'ArticleController@index')->name('admin_article');
  49. Route::get('/article/add', 'ArticleController@add')->name('admin_article_add');
  50. Route::post('/article/doadd', 'ArticleController@doadd')->name('admin_article_doadd');
  51. Route::get('/article/edit', 'ArticleController@edit')->name('admin_article_edit');
  52. Route::post('/article/doedit', 'ArticleController@doedit')->name('admin_article_doedit');
  53. Route::get('/article/del', 'ArticleController@del')->name('admin_article_del');
  54. Route::get('/article/repetarc', 'ArticleController@repetarc')->name('admin_article_repetarc');
  55. Route::get('/article/recommendarc', 'ArticleController@recommendarc')->name('admin_article_recommendarc');
  56. Route::get('/article/articleexists', 'ArticleController@articleexists')->name('admin_article_articleexists');
  57. //栏目
  58. Route::get('/category', 'CategoryController@index')->name('admin_category');
  59. Route::get('/category/add', 'CategoryController@add')->name('admin_category_add');
  60. Route::post('/category/doadd', 'CategoryController@doadd')->name('admin_category_doadd');
  61. Route::get('/category/edit', 'CategoryController@edit')->name('admin_category_edit');
  62. Route::post('/category/doedit', 'CategoryController@doedit')->name('admin_category_doedit');
  63. Route::get('/category/del', 'CategoryController@del')->name('admin_category_del');
  64. //单页
  65. Route::get('/page', 'PageController@index')->name('admin_page');
  66. Route::get('/page/add', 'PageController@add')->name('admin_page_add');
  67. Route::post('/page/doadd', 'PageController@doadd')->name('admin_page_doadd');
  68. Route::get('/page/edit', 'PageController@edit')->name('admin_page_edit');
  69. Route::post('/page/doedit', 'PageController@doedit')->name('admin_page_doedit');
  70. Route::get('/page/del', 'PageController@del')->name('admin_page_del');
  71. //友情链接
  72. Route::get('/friendlink', 'FriendlinkController@index')->name('admin_friendlink');
  73. Route::get('/friendlink/add', 'FriendlinkController@add')->name('admin_friendlink_add');
  74. Route::post('/friendlink/doadd', 'FriendlinkController@doadd')->name('admin_friendlink_doadd');
  75. Route::get('/friendlink/edit', 'FriendlinkController@edit')->name('admin_friendlink_edit');
  76. Route::post('/friendlink/doedit', 'FriendlinkController@doedit')->name('admin_friendlink_doedit');
  77. Route::get('/friendlink/del', 'FriendlinkController@del')->name('admin_friendlink_del');
  78. //在线留言管理
  79. Route::get('/guestbook', 'GuestbookController@index')->name('admin_guestbook');
  80. Route::get('/guestbook/del', 'GuestbookController@del')->name('admin_guestbook_del');
  81. //关键词管理
  82. Route::get('/keyword', 'KeywordController@index')->name('admin_keyword');
  83. Route::get('/keyword/add', 'KeywordController@add')->name('admin_keyword_add');
  84. Route::post('/keyword/doadd', 'KeywordController@doadd')->name('admin_keyword_doadd');
  85. Route::get('/keyword/edit', 'KeywordController@edit')->name('admin_keyword_edit');
  86. Route::post('/keyword/doedit', 'KeywordController@doedit')->name('admin_keyword_doedit');
  87. Route::get('/keyword/del', 'KeywordController@del')->name('admin_keyword_del');
  88. //产品
  89. Route::get('/product', 'ProductController@index')->name('admin_product');
  90. Route::get('/product/add', 'ProductController@add')->name('admin_product_add');
  91. Route::post('/product/doadd', 'ProductController@doadd')->name('admin_product_doadd');
  92. Route::get('/product/edit', 'ProductController@edit')->name('admin_product_edit');
  93. Route::post('/product/doedit', 'ProductController@doedit')->name('admin_product_doedit');
  94. Route::get('/product/del', 'ProductController@del')->name('admin_product_del');
  95. //搜索关键词
  96. Route::get('/searchword', 'SearchwordController@index')->name('admin_searchword');
  97. Route::get('/searchword/add', 'SearchwordController@add')->name('admin_searchword_add');
  98. Route::post('/searchword/doadd', 'SearchwordController@doadd')->name('admin_searchword_doadd');
  99. Route::get('/searchword/edit', 'SearchwordController@edit')->name('admin_searchword_edit');
  100. Route::post('/searchword/doedit', 'SearchwordController@doedit')->name('admin_searchword_doedit');
  101. Route::get('/searchword/del', 'SearchwordController@del')->name('admin_searchword_del');
  102. //幻灯片
  103. Route::get('/slide', 'SlideController@index')->name('admin_slide');
  104. Route::get('/slide/add', 'SlideController@add')->name('admin_slide_add');
  105. Route::post('/slide/doadd', 'SlideController@doadd')->name('admin_slide_doadd');
  106. Route::get('/slide/edit', 'SlideController@edit')->name('admin_slide_edit');
  107. Route::post('/slide/doedit', 'SlideController@doedit')->name('admin_slide_doedit');
  108. Route::get('/slide/del', 'SlideController@del')->name('admin_slide_del');
  109. //标签
  110. Route::get('/tag', 'TagController@index')->name('admin_tag');
  111. Route::get('/tag/add', 'TagController@add')->name('admin_tag_add');
  112. Route::post('/tag/doadd', 'TagController@doadd')->name('admin_tag_doadd');
  113. Route::get('/tag/edit', 'TagController@edit')->name('admin_tag_edit');
  114. Route::post('/tag/doedit', 'TagController@doedit')->name('admin_tag_doedit');
  115. Route::get('/tag/del', 'TagController@del')->name('admin_tag_del');
  116. //系统参数配置
  117. Route::get('/sysconfig', 'SysconfigController@index')->name('admin_sysconfig');
  118. Route::get('/sysconfig/add', 'SysconfigController@add')->name('admin_sysconfig_add');
  119. Route::post('/sysconfig/doadd', 'SysconfigController@doadd')->name('admin_sysconfig_doadd');
  120. Route::get('/sysconfig/edit', 'SysconfigController@edit')->name('admin_sysconfig_edit');
  121. Route::post('/sysconfig/doedit', 'SysconfigController@doedit')->name('admin_sysconfig_doedit');
  122. Route::get('/sysconfig/del', 'SysconfigController@del')->name('admin_sysconfig_del');
  123. //用户
  124. Route::get('/user', 'UserController@index')->name('admin_user');
  125. Route::get('/user/edit', 'UserController@edit')->name('admin_user_edit');
  126. Route::post('/user/doedit', 'UserController@doedit')->name('admin_user_doedit');
  127. //后台登录注销
  128. Route::get('/login', 'LoginController@login')->name('admin_login');
  129. Route::post('/dologin', 'LoginController@dologin');
  130. Route::get('/logout', 'LoginController@logout')->name('admin_logout');
  131. Route::get('/recoverpwd', 'LoginController@recoverpwd')->name('admin_recoverpwd');
  132. Route::get('/jump', 'LoginController@jump')->name('admin_jump');
  133. });
  134. //接口路由
  135. Route::group(['prefix' => 'Api'], function () {
  136. Route::get('/ccc', function () {
  137. // 匹配 "/api/users" URL
  138. });
  139. });
  140. //中间件
  141. Route::group(['middleware' => 'auth'], function () {
  142. Route::get('/qwe', function () {
  143. // 使用 Auth 中间件
  144. });
  145. Route::get('user/profile', function () {
  146. // 使用 Auth 中间件
  147. });
  148. });
  149. //https://github.com/cong5/myPersimmon
  150. //前台
  151. /* Route::group(['namespace' => 'App'], function () {
  152. Route::get('/', 'HomeController@index')->name('home');
  153. Route::get('/post/{flag}', 'HomeController@posts')->name('post');
  154. Route::get('/tags/{flag}', 'HomeController@tags')->name('tags');
  155. Route::get('/category/{flag}', 'HomeController@category')->name('category');
  156. Route::get('/feed', 'HomeController@feed');
  157. Route::get('/sitemap.xml', 'HomeController@siteMap');
  158. Route::get('/xmlrpc', 'XmlRpcController@errorMessage');
  159. Route::post('/xmlrpc', 'XmlRpcController@index')->name('xmlrpc');
  160. Route::get('/friends', 'HomeController@friends')->name('friends');
  161. Route::resource('/comment', 'CommentController');
  162. Route::get('/debug', 'HomeController@debug')->name('debug');
  163. });
  164. //后台
  165. Route::group(['prefix' => 'myp', 'namespace' => 'Backend'], function () {
  166. Route::get('/', 'DashboardController@dashboard')->name('admin');
  167. Route::post('/auth/check', 'AuthController@check')->name('admin.login_check');
  168. Route::post('/auth/logout', 'AuthController@logout')->name('admin.logout');
  169. Route::post('/auth/login', 'AuthController@authenticate')->name('admin.login');
  170. });
  171. Route::group(['prefix' => 'myp', 'middleware' => 'auth', 'namespace' => 'Backend'], function () {
  172. Route::get('/dashboard/meta', 'DashboardController@meta');
  173. Route::get('/dashboard/shanbay', 'DashboardController@shanbay');
  174. Route::resource('/categorys', 'CategorysController');
  175. Route::resource('/posts', 'PostsController');
  176. Route::resource('/tags', 'TagsController');
  177. Route::resource('/links', 'LinksController');
  178. Route::resource('/options', 'OptionsController');
  179. Route::resource('/settings', 'SettingsController');
  180. Route::resource('/navigations', 'NavigationController');
  181. Route::resource('/uploads', 'FileController');
  182. Route::resource('/util', 'UtilController');
  183. Route::resource('/user', 'UserController');
  184. Route::resource('/comments', 'CommentController');
  185. Route::resource('/trash', 'TrashController');
  186. }); */