wechat_admin.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. use Illuminate\Support\Facades\Route;
  3. Route::group([
  4. 'prefix' => config('admin.route.prefix').'/wechat',
  5. 'namespace' => 'Hanson\\LaravelAdminWechat\\Http\\Controllers\\Admin',
  6. 'middleware' => config('admin.route.middleware'),
  7. ], function () {
  8. Route::resources([
  9. 'configs' => 'ConfigController',
  10. ]);
  11. // 公众号操作
  12. Route::group(['prefix' => 'official-account', 'namespace' => 'OfficialAccount'], function () {
  13. Route::resource('cards', 'CardController');
  14. Route::resource('users', 'UserController', ['as' => 'official-account']);
  15. Route::get('menu', 'MenuController@index')->name('admin.wechat.menu');
  16. Route::post('menu', 'MenuController@store')->name('admin.wechat.menu.update');
  17. });
  18. // 小程序操作
  19. Route::group(['prefix' => 'mini-program', 'namespace' => 'MiniProgram'], function () {
  20. Route::resource('users', 'UserController', ['as' => 'mini-program']);
  21. });
  22. // 支付操作
  23. Route::group(['prefix' => 'payment', 'namespace' => 'Payment'], function () {
  24. Route::resources([
  25. 'merchants' => 'MerchantController',
  26. ]);
  27. });
  28. });