65 lines
1.4 KiB
PHP
65 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Shop\Admin;
|
|
|
|
use Illuminate\Http\Request;
|
|
use App\Http\Controllers\Controller;
|
|
|
|
use App\Repositories\Shop\PriceFamilies;
|
|
use App\Repositories\Shop\PriceFamilyValues;
|
|
use App\DataTables\Shop\PriceFamilyValuesDataTable;
|
|
|
|
class PriceFamilyValueController extends Controller
|
|
{
|
|
public function index(PriceFamilyValuesDataTable $dataTable)
|
|
{
|
|
$data['families'] = PriceFamilies::getOptions();
|
|
return $dataTable->render('Shop.Admin.PriceFamilyValues.list', $data);
|
|
}
|
|
|
|
public function getDatatable(Request $request)
|
|
{
|
|
return PriceFamilyValues::getTables($request->all());
|
|
}
|
|
|
|
public function getOptionsByFamily(Request $request)
|
|
{
|
|
$id = $request->input('family_id');
|
|
return response()->json(PriceFamilyValues::getSelectByFamily($id));
|
|
}
|
|
|
|
public function create()
|
|
{
|
|
return view('Shop.Admin.PriceFamilyValues.create');
|
|
}
|
|
|
|
public function store(Request $request)
|
|
{
|
|
$ret = PriceFamilyValues::store($request->all());
|
|
return redirect()->route('Shop.Admin.PriceFamilyValues.index');
|
|
}
|
|
|
|
public function show($id)
|
|
{
|
|
$data = PriceFamilyValues::get($id);
|
|
return view('Shop.Admin.PriceFamilyValues.view', $data);
|
|
}
|
|
|
|
public function edit($id)
|
|
{
|
|
$data = PriceFamilyValues::get($id);
|
|
return view('Shop.Admin.PriceFamilyValues.edit', $data);
|
|
}
|
|
|
|
public function update(Request $request)
|
|
{
|
|
//
|
|
}
|
|
|
|
public function destroy($id)
|
|
{
|
|
return PriceFamilyValues::destroy($id);
|
|
}
|
|
|
|
}
|