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.

250 lines
14 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
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('/p/{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('/sitemap.xml', 'IndexController@sitemap')->name('wap_sitemap'); //sitemap
  24. Route::get('/aaa', function () {
  25. dd('wap');
  26. });
  27. });
  28. //前台路由
  29. Route::group(['namespace' => 'Home'], function () {
  30. Route::get('/', 'IndexController@index')->name('home');
  31. Route::get('/page404', 'IndexController@page404')->name('page404'); //404页面
  32. Route::get('/tags', 'IndexController@tags')->name('tags');
  33. Route::get('/search', 'IndexController@search');
  34. Route::get('/p/{id}', 'IndexController@detail')->name('home_detail'); //详情页
  35. Route::get('/cat{cat}/{page}', 'IndexController@category'); //分类页,分页
  36. Route::get('/cat{cat}', 'IndexController@category')->name('home_category'); //分类页
  37. Route::get('/tag{tag}/{page}', 'IndexController@tag'); //标签页,分页
  38. Route::get('/tag{tag}', 'IndexController@tag')->name('tag'); //标签页
  39. Route::get('/page/{id}', 'IndexController@page')->name('singlepage'); //单页
  40. Route::get('/product/{id}', 'IndexController@product')->name('product'); //详情页
  41. Route::get('/productcat{cat}/{page}', 'IndexController@productcat'); //产品分类页,分页
  42. Route::get('/productcat{cat}', 'IndexController@productcat')->name('productcat'); //产品分类页
  43. Route::get('/sitemap.xml', 'IndexController@sitemap')->name('sitemap'); //sitemap
  44. Route::get('/aaa', function () {
  45. dd('wap');
  46. });
  47. });
  48. //后台路由
  49. Route::group(['prefix' => 'fladmin', 'namespace' => 'Admin', 'middleware' => ['web']], function () {
  50. Route::get('/', 'IndexController@index')->name('admin');
  51. Route::get('/index/upconfig', 'IndexController@upconfig')->name('admin_index_upconfig'); //更新系统参数配置
  52. Route::get('/index/upcache', 'IndexController@upcache')->name('admin_index_upcache'); //更新缓存
  53. //文章
  54. Route::get('/article', 'ArticleController@index')->name('admin_article');
  55. Route::get('/article/add', 'ArticleController@add')->name('admin_article_add');
  56. Route::post('/article/doadd', 'ArticleController@doadd')->name('admin_article_doadd');
  57. Route::get('/article/edit', 'ArticleController@edit')->name('admin_article_edit');
  58. Route::post('/article/doedit', 'ArticleController@doedit')->name('admin_article_doedit');
  59. Route::get('/article/del', 'ArticleController@del')->name('admin_article_del');
  60. Route::get('/article/repetarc', 'ArticleController@repetarc')->name('admin_article_repetarc');
  61. Route::get('/article/recommendarc', 'ArticleController@recommendarc')->name('admin_article_recommendarc');
  62. Route::get('/article/articleexists', 'ArticleController@articleexists')->name('admin_article_articleexists');
  63. //栏目
  64. Route::get('/category', 'CategoryController@index')->name('admin_category');
  65. Route::get('/category/add', 'CategoryController@add')->name('admin_category_add');
  66. Route::post('/category/doadd', 'CategoryController@doadd')->name('admin_category_doadd');
  67. Route::get('/category/edit', 'CategoryController@edit')->name('admin_category_edit');
  68. Route::post('/category/doedit', 'CategoryController@doedit')->name('admin_category_doedit');
  69. Route::get('/category/del', 'CategoryController@del')->name('admin_category_del');
  70. //标签
  71. Route::get('/tag', 'TagController@index')->name('admin_tag');
  72. Route::get('/tag/add', 'TagController@add')->name('admin_tag_add');
  73. Route::post('/tag/doadd', 'TagController@doadd')->name('admin_tag_doadd');
  74. Route::get('/tag/edit', 'TagController@edit')->name('admin_tag_edit');
  75. Route::post('/tag/doedit', 'TagController@doedit')->name('admin_tag_doedit');
  76. Route::get('/tag/del', 'TagController@del')->name('admin_tag_del');
  77. //单页
  78. Route::get('/page', 'PageController@index')->name('admin_page');
  79. Route::get('/page/add', 'PageController@add')->name('admin_page_add');
  80. Route::post('/page/doadd', 'PageController@doadd')->name('admin_page_doadd');
  81. Route::get('/page/edit', 'PageController@edit')->name('admin_page_edit');
  82. Route::post('/page/doedit', 'PageController@doedit')->name('admin_page_doedit');
  83. Route::get('/page/del', 'PageController@del')->name('admin_page_del');
  84. //产品
  85. Route::get('/product', 'ProductController@index')->name('admin_product');
  86. Route::get('/product/add', 'ProductController@add')->name('admin_product_add');
  87. Route::post('/product/doadd', 'ProductController@doadd')->name('admin_product_doadd');
  88. Route::get('/product/edit', 'ProductController@edit')->name('admin_product_edit');
  89. Route::post('/product/doedit', 'ProductController@doedit')->name('admin_product_doedit');
  90. Route::get('/product/del', 'ProductController@del')->name('admin_product_del');
  91. Route::get('/product/recommendarc', 'ProductController@recommendarc')->name('admin_product_recommendarc');
  92. Route::get('/product/articleexists', 'ProductController@productexists')->name('admin_product_productexists');
  93. //产品分类
  94. Route::get('/producttype', 'ProductTypeController@index')->name('admin_producttype');
  95. Route::get('/producttype/add', 'ProductTypeController@add')->name('admin_producttype_add');
  96. Route::post('/producttype/doadd', 'ProductTypeController@doadd')->name('admin_producttype_doadd');
  97. Route::get('/producttype/edit', 'ProductTypeController@edit')->name('admin_producttype_edit');
  98. Route::post('/producttype/doedit', 'ProductTypeController@doedit')->name('admin_producttype_doedit');
  99. Route::get('/producttype/del', 'ProductTypeController@del')->name('admin_producttype_del');
  100. //友情链接
  101. Route::get('/friendlink', 'FriendlinkController@index')->name('admin_friendlink');
  102. Route::get('/friendlink/add', 'FriendlinkController@add')->name('admin_friendlink_add');
  103. Route::post('/friendlink/doadd', 'FriendlinkController@doadd')->name('admin_friendlink_doadd');
  104. Route::get('/friendlink/edit', 'FriendlinkController@edit')->name('admin_friendlink_edit');
  105. Route::post('/friendlink/doedit', 'FriendlinkController@doedit')->name('admin_friendlink_doedit');
  106. Route::get('/friendlink/del', 'FriendlinkController@del')->name('admin_friendlink_del');
  107. //关键词管理
  108. Route::get('/keyword', 'KeywordController@index')->name('admin_keyword');
  109. Route::get('/keyword/add', 'KeywordController@add')->name('admin_keyword_add');
  110. Route::post('/keyword/doadd', 'KeywordController@doadd')->name('admin_keyword_doadd');
  111. Route::get('/keyword/edit', 'KeywordController@edit')->name('admin_keyword_edit');
  112. Route::post('/keyword/doedit', 'KeywordController@doedit')->name('admin_keyword_doedit');
  113. Route::get('/keyword/del', 'KeywordController@del')->name('admin_keyword_del');
  114. //搜索关键词
  115. Route::get('/searchword', 'SearchwordController@index')->name('admin_searchword');
  116. Route::get('/searchword/add', 'SearchwordController@add')->name('admin_searchword_add');
  117. Route::post('/searchword/doadd', 'SearchwordController@doadd')->name('admin_searchword_doadd');
  118. Route::get('/searchword/edit', 'SearchwordController@edit')->name('admin_searchword_edit');
  119. Route::post('/searchword/doedit', 'SearchwordController@doedit')->name('admin_searchword_doedit');
  120. Route::get('/searchword/del', 'SearchwordController@del')->name('admin_searchword_del');
  121. //幻灯片
  122. Route::get('/slide', 'SlideController@index')->name('admin_slide');
  123. Route::get('/slide/add', 'SlideController@add')->name('admin_slide_add');
  124. Route::post('/slide/doadd', 'SlideController@doadd')->name('admin_slide_doadd');
  125. Route::get('/slide/edit', 'SlideController@edit')->name('admin_slide_edit');
  126. Route::post('/slide/doedit', 'SlideController@doedit')->name('admin_slide_doedit');
  127. Route::get('/slide/del', 'SlideController@del')->name('admin_slide_del');
  128. //在线留言管理
  129. Route::get('/guestbook', 'GuestbookController@index')->name('admin_guestbook');
  130. Route::get('/guestbook/del', 'GuestbookController@del')->name('admin_guestbook_del');
  131. //系统参数配置
  132. Route::get('/sysconfig', 'SysconfigController@index')->name('admin_sysconfig');
  133. Route::get('/sysconfig/add', 'SysconfigController@add')->name('admin_sysconfig_add');
  134. Route::post('/sysconfig/doadd', 'SysconfigController@doadd')->name('admin_sysconfig_doadd');
  135. Route::get('/sysconfig/edit', 'SysconfigController@edit')->name('admin_sysconfig_edit');
  136. Route::post('/sysconfig/doedit', 'SysconfigController@doedit')->name('admin_sysconfig_doedit');
  137. Route::get('/sysconfig/del', 'SysconfigController@del')->name('admin_sysconfig_del');
  138. //用户管理
  139. Route::get('/user', 'UserController@index')->name('admin_user');
  140. Route::get('/user/add', 'UserController@add')->name('admin_user_add');
  141. Route::post('/user/doadd', 'UserController@doadd')->name('admin_user_doadd');
  142. Route::get('/user/edit', 'UserController@edit')->name('admin_user_edit');
  143. Route::post('/user/doedit', 'UserController@doedit')->name('admin_user_doedit');
  144. Route::get('/user/del', 'UserController@del')->name('admin_user_del');
  145. //角色管理
  146. Route::get('/userrole', 'UserRoleController@index')->name('admin_userrole');
  147. Route::get('/userrole/add', 'UserRoleController@add')->name('admin_userrole_add');
  148. Route::post('/userrole/doadd', 'UserRoleController@doadd')->name('admin_userrole_doadd');
  149. Route::get('/userrole/edit', 'UserRoleController@edit')->name('admin_userrole_edit');
  150. Route::post('/userrole/doedit', 'UserRoleController@doedit')->name('admin_userrole_doedit');
  151. Route::get('/userrole/del', 'UserRoleController@del')->name('admin_userrole_del');
  152. //菜单管理
  153. Route::get('/menu', 'MenuController@index')->name('admin_menu');
  154. Route::get('/menu/add', 'MenuController@add')->name('admin_menu_add');
  155. Route::post('/menu/doadd', 'MenuController@doadd')->name('admin_menu_doadd');
  156. Route::get('/menu/edit', 'MenuController@edit')->name('admin_menu_edit');
  157. Route::post('/menu/doedit', 'MenuController@doedit')->name('admin_menu_doedit');
  158. Route::get('/menu/del', 'MenuController@del')->name('admin_menu_del');
  159. //后台登录注销
  160. Route::get('/login', 'LoginController@login')->name('admin_login');
  161. Route::post('/dologin', 'LoginController@dologin')->name('admin_dologin');
  162. Route::get('/logout', 'LoginController@logout')->name('admin_logout');
  163. Route::get('/recoverpwd', 'LoginController@recoverpwd')->name('admin_recoverpwd');
  164. //页面跳转
  165. Route::get('/jump', 'LoginController@jump')->name('admin_jump');
  166. });
  167. //接口路由
  168. Route::group(['prefix' => 'api', 'namespace' => 'Api', 'middleware' => ['web']], function () {
  169. Route::post('/listarc', 'IndexController@listarc')->name('api_listarc');
  170. Route::get('/ccc', function () {
  171. // 匹配 "/api/users" URL
  172. });
  173. });
  174. //中间件
  175. Route::group(['middleware' => 'auth'], function () {
  176. Route::get('/qwe', function () {
  177. // 使用 Auth 中间件
  178. });
  179. Route::get('user/profile', function () {
  180. // 使用 Auth 中间件
  181. });
  182. });
  183. //https://github.com/cong5/myPersimmon
  184. //前台
  185. /* Route::group(['namespace' => 'App'], function () {
  186. Route::get('/', 'HomeController@index')->name('home');
  187. Route::get('/post/{flag}', 'HomeController@posts')->name('post');
  188. Route::get('/tags/{flag}', 'HomeController@tags')->name('tags');
  189. Route::get('/category/{flag}', 'HomeController@category')->name('category');
  190. Route::get('/feed', 'HomeController@feed');
  191. Route::get('/sitemap.xml', 'HomeController@siteMap');
  192. Route::get('/xmlrpc', 'XmlRpcController@errorMessage');
  193. Route::post('/xmlrpc', 'XmlRpcController@index')->name('xmlrpc');
  194. Route::get('/friends', 'HomeController@friends')->name('friends');
  195. Route::resource('/comment', 'CommentController');
  196. Route::get('/debug', 'HomeController@debug')->name('debug');
  197. });
  198. //后台
  199. Route::group(['prefix' => 'myp', 'namespace' => 'Backend'], function () {
  200. Route::get('/', 'DashboardController@dashboard')->name('admin');
  201. Route::post('/auth/check', 'AuthController@check')->name('admin.login_check');
  202. Route::post('/auth/logout', 'AuthController@logout')->name('admin.logout');
  203. Route::post('/auth/login', 'AuthController@authenticate')->name('admin.login');
  204. });
  205. Route::group(['prefix' => 'myp', 'middleware' => 'auth', 'namespace' => 'Backend'], function () {
  206. Route::get('/dashboard/meta', 'DashboardController@meta');
  207. Route::get('/dashboard/shanbay', 'DashboardController@shanbay');
  208. Route::resource('/categorys', 'CategorysController');
  209. Route::resource('/posts', 'PostsController');
  210. Route::resource('/tags', 'TagsController');
  211. Route::resource('/links', 'LinksController');
  212. Route::resource('/options', 'OptionsController');
  213. Route::resource('/settings', 'SettingsController');
  214. Route::resource('/navigations', 'NavigationController');
  215. Route::resource('/uploads', 'FileController');
  216. Route::resource('/util', 'UtilController');
  217. Route::resource('/user', 'UserController');
  218. Route::resource('/comments', 'CommentController');
  219. Route::resource('/trash', 'TrashController');
  220. }); */