[WIP] Refactor project
This commit is contained in:
@@ -2,85 +2,45 @@
|
||||
|
||||
namespace App\Http\Controllers\Shop\Admin;
|
||||
|
||||
use App\Invoice;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
use App\Repositories\Shop\Invoices;
|
||||
use App\Datatables\Shop\InvoicesDataTable;
|
||||
|
||||
class InvoiceController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
//
|
||||
}
|
||||
public function index(InvoicesDataTable $dataTable)
|
||||
{
|
||||
return $dataTable->render('Shop.Admin.Invoices.list', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
//
|
||||
}
|
||||
public function create()
|
||||
{
|
||||
return view('Shop.Admin.Invoices.create');
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
//
|
||||
}
|
||||
public function store(Request $request)
|
||||
{
|
||||
$ret = Invoices::store($request->all());
|
||||
return redirect()->route('Shop.Admin.Invoices.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param \App\Invoice $invoice
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function show(Invoice $invoice)
|
||||
{
|
||||
//
|
||||
}
|
||||
public function show($id)
|
||||
{
|
||||
$data = Invoices::get($id);
|
||||
return view('Shop.Admin.Invoices.view', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*
|
||||
* @param \App\Invoice $invoice
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function edit(Invoice $invoice)
|
||||
{
|
||||
//
|
||||
}
|
||||
public function edit($id)
|
||||
{
|
||||
$data['customer'] = Invoices::get($id)->toArray();
|
||||
return view('Shop.Admin.Invoices.edit', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \App\Invoice $invoice
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(Request $request, Invoice $invoice)
|
||||
{
|
||||
//
|
||||
}
|
||||
public function destroy($id)
|
||||
{
|
||||
return Invoices::destroy($id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param \App\Invoice $invoice
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function destroy(Invoice $invoice)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user