refactoring on Articles, minor fixes
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user