parent
f03862b523
commit
1a43060996
42 changed files with 1160 additions and 83 deletions
|
|
@ -24,7 +24,7 @@ class ProductController extends Controller
|
|||
public function index()
|
||||
{
|
||||
$data = [
|
||||
'values' => Product::all(),
|
||||
'values' => Product::orderBy('pos', 'DESC')->orderBy('id', 'DESC')->get(),
|
||||
];
|
||||
return view('admin.product.index', $data);
|
||||
}
|
||||
|
|
@ -78,6 +78,17 @@ class ProductController extends Controller
|
|||
|
||||
}
|
||||
|
||||
public function copy($id){
|
||||
$model = Product::findOrFail($id);
|
||||
|
||||
$product = $this->productRepo->copy($model);
|
||||
|
||||
|
||||
|
||||
\Session()->flash('alert-success', 'Eintrag kopiert');
|
||||
return redirect(route('admin_product_show'));
|
||||
}
|
||||
|
||||
public function delete($id){
|
||||
$model = Product::findOrFail($id);
|
||||
$model->delete();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue