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.

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