refactoring on Articles, minor fixes

This commit is contained in:
ludo
2024-01-21 11:42:42 +01:00
parent 7e5b1fea89
commit 88a57a9c32
21 changed files with 467 additions and 367 deletions

View File

@@ -6,6 +6,7 @@ use App\Datatables\Admin\Shop\ArticlesDataTable;
use App\Http\Requests\Admin\Shop\StoreArticlePost;
use App\Repositories\Shop\ArticleNatures;
use App\Repositories\Shop\Articles;
use App\Repositories\Shop\ArticleInherited;
use App\Repositories\Shop\Categories;
use App\Repositories\Shop\Tags;
use Illuminate\Http\Request;
@@ -71,7 +72,7 @@ class ArticleController extends Controller
{
$data = [
'article' => [
'inherited' => Articles::getInheritedByProduct($productId, base64_decode($model)),
'inherited' => ArticleInherited::getInheritedByProduct($productId, base64_decode($model)),
],
];
@@ -80,7 +81,7 @@ class ArticleController extends Controller
public function getProductTags($productId, $model)
{
$data = Articles::getInheritedByProduct($productId, base64_decode($model));
$data = ArticleInherited::getInheritedByProduct($productId, base64_decode($model));
return view('Admin.Shop.Articles.partials.product.tags', $data);
}

View File

@@ -28,7 +28,7 @@ class ContentController extends Controller
public function edit($id)
{
$data = [
'homepage' => Contents::get($id),
'content' => Contents::get($id),
];
return view('Admin.Shop.Contents.edit', $data);

View File

@@ -10,19 +10,17 @@ class CustomerAddressController extends Controller
{
public function index(CustomerAddressesDataTable $dataTable)
{
$data = [];
return $dataTable->render('Admin.Shop.Customers.list', $data);
return $dataTable->render('Admin.Shop.Customers.list');
}
public function create()
{
return view('Admin.Shop.CustomerAddresses.create', $data);
return view('Admin.Shop.CustomerAddresses.create');
}
public function store(Request $request)
{
$ret = CustomerAddresses::storeFull($request->all());
$ret = CustomerAddresses::store($request->all());
return redirect()->route('Admin.Shop.CustomerAddresses.index');
}