Add refreshing for inherited data

This commit is contained in:
Ludovic CANDELLIER
2021-08-30 22:59:50 +02:00
parent 8d3ccbf148
commit 144532acbf
10 changed files with 73 additions and 15 deletions

View File

@@ -45,6 +45,8 @@ class ArticleController extends Controller
public function edit($id)
{
$data = Articles::getFull($id);
// dump($data);
// exit;
return view('Admin.Shop.Articles.edit', $data);
}
@@ -53,6 +55,24 @@ class ArticleController extends Controller
return Articles::destroy($id);
}
public function getProductDescription($product_id, $model)
{
$data['article']['inherited'] = Articles::getInheritedByProduct($product_id, base64_decode($model));
return view('Admin.Shop.Articles.partials.product.description', $data);
}
public function getProductTags($product_id, $model)
{
$data = Articles::getInheritedByProduct($product_id, base64_decode($model));
return view('Admin.Shop.Articles.partials.product.tags', $data);
}
public function getProductImages($product_id, $model)
{
$data = Articles::getInheritedByProduct($product_id, base64_decode($model));
return view('Admin.Shop.Articles.partials.product.images', $data);
}
public function getImages(Request $request, $id = false)
{
$id = $id ? $id : $request->input('id');

View File

@@ -31,7 +31,7 @@ class CategoryController extends Controller
public function store(Request $request)
{
$ret = Categories::store($request->all());
$ret = Categories::storeFull($request->all());
return redirect()->route('Admin.Shop.Categories.index');
}