fix bug
This commit is contained in:
@@ -69,6 +69,30 @@ class ProductController extends SuperController
|
||||
|
||||
}
|
||||
|
||||
public function archiveTable(Request $request)
|
||||
{
|
||||
$data = $request->all();
|
||||
if (isset($data['select']) && is_null($data['select'])) {
|
||||
$data['select'] = [];
|
||||
}
|
||||
|
||||
$query_table = Product::onlyTrashed()->with($this->with);
|
||||
TableEngine::create($query_table, $data)
|
||||
->initSearch($this->search)
|
||||
->select($this->select)
|
||||
->export($query_table);
|
||||
|
||||
return $query_table;
|
||||
}
|
||||
|
||||
public function archive($id)
|
||||
{
|
||||
$product = Product::onlyTrashed()->findOrFail($id);
|
||||
$product->restore();
|
||||
|
||||
return response()->json(true);
|
||||
}
|
||||
|
||||
public function editProducts(Request $request)
|
||||
{
|
||||
if (isset($request->auto_open_at, $request->auto_close_at)) {
|
||||
|
||||
Reference in New Issue
Block a user