[WIP] Fix ergonomics rules
This commit is contained in:
@@ -2,10 +2,11 @@
|
||||
|
||||
namespace App\Http\Controllers\Shop\Admin;
|
||||
|
||||
use App\Section;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
use App\Repositories\Shop\Sections;
|
||||
|
||||
class SectionController extends Controller
|
||||
{
|
||||
/**
|
||||
@@ -13,9 +14,19 @@ class SectionController extends Controller
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index()
|
||||
public function index(Request $request)
|
||||
{
|
||||
//
|
||||
if ($request->ajax()) {
|
||||
return self::getDatatable($request);
|
||||
} else {
|
||||
$data = [];
|
||||
return view('Shop.Admin.Sections.list', $data);
|
||||
}
|
||||
}
|
||||
|
||||
public function getDatatable(Request $request)
|
||||
{
|
||||
return Sections::getTables($request->all());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -25,7 +36,8 @@ class SectionController extends Controller
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
//
|
||||
$data = [];
|
||||
return view('Shop.Admin.Sections.create', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -36,39 +48,42 @@ class SectionController extends Controller
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
//
|
||||
$ret = Sections::store($request);
|
||||
return redirect()->route('Shop.Admin.Sections.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param \App\Section $Section
|
||||
* @param \App\Customer $customer
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function show(Section $Section)
|
||||
public function show($id)
|
||||
{
|
||||
//
|
||||
$data = Sections::get($id);
|
||||
return view('Shop.Admin.Sections.view', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*
|
||||
* @param \App\Section $Section
|
||||
* @param \App\Customer $customer
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function edit(Section $Section)
|
||||
public function edit($id)
|
||||
{
|
||||
//
|
||||
$data = Sections::get($id);
|
||||
return view('Shop.Admin.Sections.edit', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \App\Section $Section
|
||||
* @param \App\Customer $customer
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(Request $request, Section $Section)
|
||||
public function update(Request $request)
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -76,11 +91,11 @@ class SectionController extends Controller
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param \App\Section $Section
|
||||
* @param \App\Customer $customer
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function destroy(Section $Section)
|
||||
public function destroy($id)
|
||||
{
|
||||
//
|
||||
return Sections::destroy($id);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user