change homepages to contents, add new methods to deliveries and sale_channels by customer
This commit is contained in:
44
app/Http/Controllers/Admin/Shop/ContentController.php
Normal file
44
app/Http/Controllers/Admin/Shop/ContentController.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin\Shop;
|
||||
|
||||
use App\Datatables\Admin\Shop\ContentsDataTable;
|
||||
use App\Repositories\Shop\Contents;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class ContentController extends Controller
|
||||
{
|
||||
public function index(ContentsDataTable $dataTable)
|
||||
{
|
||||
return $dataTable->render('Admin.Shop.Contents.list', $data ?? []);
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
return view('Admin.Shop.Contents.create', $data ?? []);
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
{
|
||||
$ret = Contents::store($request->all());
|
||||
|
||||
return redirect()->route('Admin.Shop.Contents.index');
|
||||
}
|
||||
|
||||
public function show($id)
|
||||
{
|
||||
return view('Admin.Shop.Contents.view', $data ?? []);
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$data['homepage'] = Contents::get($id);
|
||||
|
||||
return view('Admin.Shop.Contents.edit', $data);
|
||||
}
|
||||
|
||||
public function destroy($id)
|
||||
{
|
||||
return Contents::destroy($id);
|
||||
}
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin\Shop;
|
||||
|
||||
use App\Datatables\Admin\Shop\HomepagesDataTable;
|
||||
use App\Repositories\Shop\Homepages;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class HomepageController extends Controller
|
||||
{
|
||||
public function index(HomepagesDataTable $dataTable)
|
||||
{
|
||||
return $dataTable->render('Admin.Shop.Homepages.list', $data ?? []);
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
return view('Admin.Shop.Homepages.create', $data ?? []);
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
{
|
||||
$ret = Homepages::store($request->all());
|
||||
|
||||
return redirect()->route('Admin.Shop.Homepages.index');
|
||||
}
|
||||
|
||||
public function show($id)
|
||||
{
|
||||
return view('Admin.Shop.Homepages.view', $data ?? []);
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$data['homepage'] = Homepages::get($id);
|
||||
|
||||
return view('Admin.Shop.Homepages.edit', $data);
|
||||
}
|
||||
|
||||
public function destroy($id)
|
||||
{
|
||||
return Homepages::destroy($id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user