Add new version in repository
This commit is contained in:
46
app/Http/Controllers/Admin/Shop/SaleChannelController.php
Normal file
46
app/Http/Controllers/Admin/Shop/SaleChannelController.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin\Shop;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
use App\Repositories\Shop\ArticleNatures;
|
||||
use App\Repositories\Shop\SaleChannels;
|
||||
use App\Datatables\Shop\SaleChannelsDataTable;
|
||||
|
||||
class SaleChannelController extends Controller
|
||||
{
|
||||
public function index(SaleChannelsDataTable $dataTable)
|
||||
{
|
||||
return $dataTable->render('Admin.Shop.SaleChannels.list', $data ?? []);
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
return view('Admin.Shop.SaleChannels.create', $data ?? []);
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
{
|
||||
$ret = SaleChannels::store($request->all());
|
||||
return redirect()->route('Admin.Shop.SaleChannels.index');
|
||||
}
|
||||
|
||||
public function show($id)
|
||||
{
|
||||
$data['sale_channel'] = SaleChannels::get($id);
|
||||
return view('Admin.Shop.SaleChannels.view', $data);
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$data['sale_channel'] = SaleChannels::get($id);
|
||||
return view('Admin.Shop.SaleChannels.edit', $data);
|
||||
}
|
||||
|
||||
public function destroy($id)
|
||||
{
|
||||
return SaleChannels::destroy($id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user