Skip to content

Commit

Permalink
remove redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
erfantkerfan committed Aug 11, 2021
1 parent e1ed6e1 commit 96a546b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 34 deletions.
33 changes: 0 additions & 33 deletions app/Http/Controllers/PDFController.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,6 @@

class PDFController extends Controller
{
// public function pdf($id , $mode , $date)
// {
// if (auth()->user()->is_super_admin==0 && auth()->id()!=$id){
// abort(403);
// };
// switch ($mode){
// case 'payment':
// $payments = User::query()->findOrFail($id)->Payment()->OrderByDesc('date_time')->get();
// foreach ($payments as $payment){
// $payment -> sum = $payment->payment_cost+$payment->loan_payment_force+$payment->loan_payment+$payment->payment;
// }
// Controller::NumberFormat($payments);
// $pdf = PDF::loadView('pdf.payment', compact('payments'));
// return $pdf->stream('customers.pdf');
// break;
//
// case 'loan':
// $loans = User::query()->findOrFail($id)->Loan()->OrderByDesc('date_time')->get();
// Controller::NumberFormat($loans);
// $pdf = PDF::loadView('pdf.loan', compact('loans'));
// return $pdf->stream('customers.pdf');
// break;
//
// case 'request':
// $requests = User::query()->findOrFail($id)->request()->OrderByDesc('date_time')->get();
// Controller::NumberFormat($requests);
// $pdf = PDF::loadView('pdf.request', compact('requests'));
// return $pdf->stream('customers.pdf');
// break;
// }
//
// }

public function full_pdf($id)
{
if (auth()->user()->is_super_admin==0 && auth()->id()!=$id){
Expand Down
1 change: 0 additions & 1 deletion routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
Route::get('/payment/delete/{id}',[PaymentController::class, 'delete'])->name('payment_delete');
Route::get('/request/delete/{id}',[RequestController::class, 'delete'])->name('request_delete');
Route::post('/request/create',[RequestController::class, 'create'])->name('request_create');
// Route::get('/pdf/{id}/{mode}/{date}',[PDFController::class, 'pdf'])->name('pdf');
Route::get('/pdf/all/{id}/',[PDFController::class, 'full_pdf'])->name('full_pdf');
Route::get('/setpassword',[UserController::class, 'setpasswordform'])->name('setpassword_form');
Route::post('/setpassword',[UserController::class, 'setpassword'])->name('setpassword');
Expand Down

0 comments on commit 96a546b

Please sign in to comment.