48 lines
1.0 KiB
PHP
48 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Admin;
|
|
|
|
use App\Models\Refund;
|
|
use App\Models\Refunds;
|
|
use App\Http\Controllers\Controller;
|
|
use App\Models\RefundDescription;
|
|
use Illuminate\Http\Request;
|
|
|
|
class AdminRefundController extends Controller
|
|
{
|
|
/**
|
|
* Display a listing of the resource.
|
|
*/
|
|
public function index()
|
|
{
|
|
return view('admin.refund.index',[
|
|
"refunds" => Refund::latest()->get()
|
|
]);
|
|
}
|
|
|
|
/**
|
|
* Display the specified resource.
|
|
*/
|
|
public function show($id)
|
|
{
|
|
$refund = Refund::find($id);
|
|
$refundDescription = RefundDescription::where('refund_id',$id)->get();
|
|
return view('admin.refund.detail-refund',[
|
|
"refund"=> $refund,
|
|
'descriptions' => $refundDescription
|
|
]);
|
|
}
|
|
|
|
public function aprroveRefund($id){
|
|
$query = Refund::where('id',$id)->update([
|
|
|
|
]);
|
|
}
|
|
|
|
public function denyRefund($id){
|
|
$query = Refund::where('id',$id)->update([
|
|
|
|
]);
|
|
}
|
|
}
|