超管后台品牌列表

main
limu 12 months ago
parent 11802839fc
commit b631520f57
  1. 1
      app/common/repositories/store/StoreCategoryRepository.php
  2. 7
      app/controller/admin/store/StoreBrand.php
  3. 3
      route/admin/product.php

@ -107,6 +107,7 @@ class StoreCategoryRepository extends BaseRepository
*/
public function getBrandList()
{
return app()->make(StoreBrandRepository::class)->getAll();
}

@ -85,6 +85,7 @@ class StoreBrand extends BaseController
return app('json')->fail('数据不存在');
return app('json')->success($this->repository->get($id));
}
/**
* 验证
* @param validate $validate
@ -137,4 +138,10 @@ class StoreBrand extends BaseController
$this->repository->update($id, ['is_show' => $status]);
return app('json')->success('修改成功');
}
public function all()
{
$data = $this->repository->getAll();
return app('json')->success($data);
}
}

@ -150,6 +150,9 @@ Route::group(function () {
Route::get('lst', '/lst')->name('systemStoreBrandLst')->option([
'_alias' => '列表',
]);
Route::get('brandList', '/all')->name('systemStoreBrandAll')->option([
'_alias' => '列表',
]);
Route::post('status/:id', '/switchStatus')->name('systemStoreBrandSwithStatus')->option([
'_alias' => '修改状态',
]);

Loading…
Cancel
Save