Add categories generic prices
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Shop\Admin;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
use App\Repositories\Shop\PriceGenericCategories;
|
||||
use App\DataTables\Shop\PriceGenericCategoriesDataTable;
|
||||
|
||||
class PriceGenericCategoryController extends Controller
|
||||
{
|
||||
public function index(PriceGenericsDataTable $dataTable)
|
||||
{
|
||||
return $dataTable->render('Shop.Admin.PriceGenericCategories.list', $data);
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
return view('Shop.Admin.PriceGenericCategories.create');
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$data['generic_category'] = PriceGenericCategories::get($id)->toArray();
|
||||
return view('Shop.Admin.PriceGenericCategories.edit', $data);
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
{
|
||||
$ret = PriceGenericCategories::store($request->all());
|
||||
return redirect()->route('Shop.Admin.PriceGenericCategories.index');
|
||||
}
|
||||
|
||||
public function show($id)
|
||||
{
|
||||
$data = PriceGenericCategories::get($id);
|
||||
return view('Shop.Admin.PriceGenericCategories.view', $data);
|
||||
}
|
||||
|
||||
public function destroy($id)
|
||||
{
|
||||
return PriceGenericCategories::destroy($id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user