| xqd
@@ -113,7 +113,7 @@ class ProductController extends Controller
|
|
|
if ($request->method() == 'POST') {
|
|
|
return $this->_createSave();
|
|
|
}
|
|
|
- $cat = AlbumCatModel::where([['store_id',$this->getStoreId()],['parent_id',0]])->get();
|
|
|
+ $cat = AlbumCatModel::where([['store_id',$this->getStoreId()],['parent_id','!=',0]])->get();
|
|
|
|
|
|
$data['cat_id'] = null;
|
|
|
return view('admin.album.product.edit', compact('data', 'cat', 'style'));
|
| xqd
@@ -178,9 +178,8 @@ class ProductController extends Controller
|
|
|
if ($request->method() == 'POST') {
|
|
|
return $this->_updateSave();
|
|
|
}
|
|
|
- $cat = AlbumCatModel::where([['store_id',$this->getStoreId()],['parent_id',0]])->get();
|
|
|
+ $cat = AlbumCatModel::where([['store_id',$this->getStoreId()],['parent_id','!=',0]])->get();
|
|
|
$data = $this->repository->find($request->get('id'));
|
|
|
- $parent = AlbumCatModel::where([['store_id',$this->getStoreId()],['parent_id',0],['id',$data->cat_id]])->get();
|
|
|
$data['install_img'] = json_decode($data['install_img']);
|
|
|
$data['specifications_img'] = json_decode($data['specifications_img']);
|
|
|
$data['detail'] = json_decode($data['detail']);
|