51 lines
1.2 KiB
PHP
51 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Admin\Shop;
|
|
|
|
use App\Datatables\Admin\Shop\InvoicePaymentsDataTable;
|
|
use App\Http\Controllers\Controller;
|
|
use App\Repositories\Shop\InvoicePayments;
|
|
use Illuminate\Http\Request;
|
|
|
|
class InvoicePaymentController extends Controller
|
|
{
|
|
public function index(InvoicePaymentsDataTable $dataTable)
|
|
{
|
|
return $dataTable->render('Admin.Shop.InvoicePayments.list');
|
|
}
|
|
|
|
public function create()
|
|
{
|
|
$data = InvoicePayments::init();
|
|
|
|
return view('Admin.Shop.InvoicePayments.create' , $data);
|
|
}
|
|
|
|
public function store(Request $request)
|
|
{
|
|
$ret = InvoicePayments::store($request->all());
|
|
|
|
return redirect()->route('Admin.Shop.InvoicePayments.index');
|
|
}
|
|
|
|
public function show($id)
|
|
{
|
|
$data['invoice_payment'] = InvoicePayments::getArray($id);
|
|
|
|
return view('Admin.Shop.InvoicePayments.view', $data);
|
|
}
|
|
|
|
public function edit($id)
|
|
{
|
|
$data = InvoicePayments::init();
|
|
$data['invoice_payment'] = InvoicePayments::getArray($id);
|
|
|
|
return view('Admin.Shop.InvoicePayments.edit', $data);
|
|
}
|
|
|
|
public function destroy($id)
|
|
{
|
|
return InvoicePayments::destroy($id);
|
|
}
|
|
}
|