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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -37,6 +37,9 @@ class Shop
|
|||||||
$menu->addTo('shop', 'Prix génériques', [ 'route' => 'Shop.Admin.PriceGenerics.index', 'permission' => 'backend_access' ])
|
$menu->addTo('shop', 'Prix génériques', [ 'route' => 'Shop.Admin.PriceGenerics.index', 'permission' => 'backend_access' ])
|
||||||
->activeIfRoute(['Shop.Admin.PriceGenerics.*'])->order(10);
|
->activeIfRoute(['Shop.Admin.PriceGenerics.*'])->order(10);
|
||||||
|
|
||||||
|
$menu->addTo('shop', 'Catégories Prix génériques', [ 'route' => 'Shop.Admin.PriceGenericCategories.index', 'permission' => 'backend_access' ])
|
||||||
|
->activeIfRoute(['Shop.Admin.PriceGenericCategories.*'])->order(11);
|
||||||
|
|
||||||
$menu->addTo('shop', 'Packages', [ 'route' => 'Shop.Admin.Packages.index', 'permission' => 'backend_access' ])
|
$menu->addTo('shop', 'Packages', [ 'route' => 'Shop.Admin.Packages.index', 'permission' => 'backend_access' ])
|
||||||
->activeIfRoute(['Shop.Admin.Packages.*'])->order(12);
|
->activeIfRoute(['Shop.Admin.Packages.*'])->order(12);
|
||||||
|
|
||||||
|
|||||||
12
routes/Shop/Admin/PriceGenericCategories.php
Normal file
12
routes/Shop/Admin/PriceGenericCategories.php
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
Route::prefix('PriceGenericCategories')->name('PriceGenericCategories.')->group(function () {
|
||||||
|
Route::get('', 'PriceGenericCategoryController@index')->name('index');
|
||||||
|
Route::get('create', 'PriceGenericCategoryController@create')->name('create');
|
||||||
|
Route::delete('destroy/{id?}', 'PriceGenericCategoryController@destroy')->name('destroy');
|
||||||
|
Route::post('update', 'PriceGenericCategoryController@update')->name('update');
|
||||||
|
Route::post('store', 'PriceGenericCategoryController@store')->name('store');
|
||||||
|
Route::get('edit/{id}', 'PriceGenericCategoryController@edit')->name('edit');
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
@@ -14,6 +14,7 @@ Route::middleware('auth')->prefix('Admin')->namespace('Admin')->name('Admin.')->
|
|||||||
include __DIR__ . '/OrderPayments.php';
|
include __DIR__ . '/OrderPayments.php';
|
||||||
include __DIR__ . '/Orders.php';
|
include __DIR__ . '/Orders.php';
|
||||||
include __DIR__ . '/Packages.php';
|
include __DIR__ . '/Packages.php';
|
||||||
|
include __DIR__ . '/PriceGenericCategories.php';
|
||||||
include __DIR__ . '/PriceGenerics.php';
|
include __DIR__ . '/PriceGenerics.php';
|
||||||
include __DIR__ . '/Tags.php';
|
include __DIR__ . '/Tags.php';
|
||||||
include __DIR__ . '/TagGroups.php';
|
include __DIR__ . '/TagGroups.php';
|
||||||
|
|||||||
Reference in New Issue
Block a user