Add categories for generic prices
This commit is contained in:
@@ -1,59 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Shop\Admin;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
use App\Models\Shop\ArticlePriceGeneric;
|
||||
use App\Repositories\Shop\ArticlePriceGenerics;
|
||||
use App\Repositories\Shop\Taxes;
|
||||
use App\DataTables\Shop\ArticlePriceGenericsDataTable;
|
||||
|
||||
class ArticlePriceGenericController extends Controller
|
||||
{
|
||||
public function index(ArticlePriceGenericsDataTable $dataTable)
|
||||
{
|
||||
return $dataTable->render('Shop.Admin.ArticlePriceGenerics.list');
|
||||
}
|
||||
|
||||
public function getDatatable(Request $request)
|
||||
{
|
||||
return ArticlePriceGenerics::getTables($request->all());
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
$data['taxes'] = Taxes::getOptions();
|
||||
return view('Shop.Admin.ArticlePriceGenerics.create',$data);
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
{
|
||||
$ret = ArticlePriceGenerics::store($request->all());
|
||||
return redirect()->route('Shop.Admin.ArticlePriceGenerics.index');
|
||||
}
|
||||
|
||||
public function show($id)
|
||||
{
|
||||
$data = ArticlePriceGenerics::get($id);
|
||||
return view('Shop.Admin.ArticlePriceGenerics.view', $data);
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$data['generic'] = ArticlePriceGenerics::get($id);
|
||||
$data['taxes'] = Taxes::getOptions();
|
||||
return view('Shop.Admin.ArticlePriceGenerics.edit', $data);
|
||||
}
|
||||
|
||||
public function update(Request $request)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
public function destroy($id)
|
||||
{
|
||||
return ArticlePriceGenerics::destroy($id);
|
||||
}
|
||||
}
|
||||
57
app/Http/Controllers/Shop/Admin/PriceGenericController.php
Normal file
57
app/Http/Controllers/Shop/Admin/PriceGenericController.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Shop\Admin;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
use App\Models\Shop\PriceGeneric;
|
||||
use App\Repositories\Shop\PriceGenerics;
|
||||
use App\Repositories\Shop\PriceGenericCategories;
|
||||
use App\Repositories\Shop\Taxes;
|
||||
use App\DataTables\Shop\PriceGenericsDataTable;
|
||||
|
||||
class PriceGenericController extends Controller
|
||||
{
|
||||
public function index(PriceGenericsDataTable $dataTable)
|
||||
{
|
||||
return $dataTable->render('Shop.Admin.PriceGenerics.list');
|
||||
}
|
||||
|
||||
public function getDatatable(Request $request)
|
||||
{
|
||||
return PriceGenerics::getTables($request->all());
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
$data['taxes'] = Taxes::getOptions();
|
||||
$data['categories'] = PriceGenericCategories::getOptions();
|
||||
return view('Shop.Admin.PriceGenerics.create',$data);
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$data['generic'] = PriceGenerics::get($id)->toArray();
|
||||
$data['taxes'] = Taxes::getOptions();
|
||||
$data['categories'] = PriceGenericCategories::getOptions();
|
||||
return view('Shop.Admin.PriceGenerics.edit', $data);
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
{
|
||||
$ret = PriceGenerics::store($request->all());
|
||||
return redirect()->route('Shop.Admin.PriceGenerics.index');
|
||||
}
|
||||
|
||||
public function show($id)
|
||||
{
|
||||
$data = PriceGenerics::get($id);
|
||||
return view('Shop.Admin.PriceGenerics.view', $data);
|
||||
}
|
||||
|
||||
public function destroy($id)
|
||||
{
|
||||
return PriceGenerics::destroy($id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user