add payments by invoice
This commit is contained in:
50
app/Http/Controllers/Admin/Shop/InvoicePaymentController.php
Normal file
50
app/Http/Controllers/Admin/Shop/InvoicePaymentController.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?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()
|
||||
{
|
||||
return view('Admin.Shop.InvoicePayments.create');
|
||||
}
|
||||
|
||||
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::getFull($id)->toArray();
|
||||
|
||||
return view('Admin.Shop.InvoicePayments.view', $data);
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$data = InvoicePayments::init();
|
||||
$data['invoice_payment'] = InvoicePayments::getFull($id)->toArray();
|
||||
$model = new invoice_paymentPaymentsDataTable();
|
||||
$data['invoice_payment_payments'] = $model->html();
|
||||
|
||||
return view('Admin.Shop.InvoicePayments.edit', $data);
|
||||
}
|
||||
|
||||
public function destroy($id)
|
||||
{
|
||||
return InvoicePayments::delete($id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user